Skip to content

Instantly share code, notes, and snippets.

#!/opt/saltstack/salt/bin/python3.10
# This script was generated with ChatGPT
import sys
import json
import yaml
def main():
try:
# Read JSON data from STDIN
@doesitblend
doesitblend / test_ret.py
Last active February 7, 2018 17:42
Example LocalClient Returner Usage
# Import the Salt Client library
import salt.client
# Instantiate the client with the default configuration
local = salt.client.LocalClient()
# Here we tell the master to put a job on the bus and to have all minions use the MySQL returner.
# Notice that data is returned to the Client as well as to the specified returner.
# Also note that we are specifying the targets, the function to run, arguments to that function,
@doesitblend
doesitblend / state_file_output
Last active September 5, 2017 20:56
pkg.installed shows success and failure?
1. Verify that glob matching should work when specifying package version
- Need to verify that the packages are actually installed with globbing
- Need to verify that the packages are actually installed without globbing
2. Update the ticket
3.
TESTING WITH GLOBBING:
=====================
[root@saltmaster salt]# cat /srv/salt/default.sls