text
stringlengths
81
112k
Install a certificate cert The certificate to install password The password for the certificate being installed formatted in the way described for openssl command in the PASS PHRASE ARGUMENTS section. Note: The password given here will show up as plaintext in the job returned ...
Uninstall a certificate from a keychain cert_name The name of the certificate to remove keychain The keychain to install the certificate to, this defaults to /Library/Keychains/System.keychain keychain_password If your keychain is likely to be locked pass the password and ...
List all of the installed certificates keychain The keychain to install the certificate to, this defaults to /Library/Keychains/System.keychain CLI Example: .. code-block:: bash salt '*' keychain.list_certs def list_certs(keychain="/Library/Keychains/System.keychain"): ''' ...
Get the friendly name of the given certificate cert The certificate to install password The password for the certificate being installed formatted in the way described for openssl command in the PASS PHRASE ARGUMENTS section Note: The password given here will show up as plaint...
Get the default keychain user The user to check the default keychain of domain The domain to use valid values are user|system|common|dynamic, the default is user CLI Example: .. code-block:: bash salt '*' keychain.get_default_keychain def get_default_keychain(user=None, dom...
Set the default keychain keychain The location of the keychain to set as default domain The domain to use valid values are user|system|common|dynamic, the default is user user The user to set the default keychain as CLI Example: .. code-block:: bash salt '*' key...
Returns the hash of a certificate in the keychain. name The name of the certificate (which you can get from keychain.get_friendly_name) or the location of a p12 file. password The password that is used in the certificate. Only required if your passing a p12 file. Note: This wil...
Ensure the SQS queue exists. name Name of the SQS queue. region Region to create the queue user Name of the user performing the SQS operations opts Include additional arguments and options to the aws command line def exists( name, region, user...
Remove the named SQS queue if it exists. name Name of the SQS queue. region Region to remove the queue from user Name of the user performing the SQS operations opts Include additional arguments and options to the aws command line def absent( name, reg...
>>> _parse_op('>') 'gt' >>> _parse_op('>=') 'ge' >>> _parse_op('=>') 'ge' >>> _parse_op('=> ') 'ge' >>> _parse_op('<') 'lt' >>> _parse_op('<=') 'le' >>> _parse_op('==') 'eq' >>> _parse_op(' <= ') 'le' def _parse_op(op): ''' >>> _parse_op('>') 'gt'...
>>> _parse_ver("'3.4' # pyzmq 17.1.0 stopped building wheels for python3.4") '3.4' >>> _parse_ver('"3.4"') '3.4' >>> _parse_ver('"2.6.17"') '2.6.17' def _parse_ver(ver): ''' >>> _parse_ver("'3.4' # pyzmq 17.1.0 stopped building wheels for python3.4") '3.4' >>> _parse_ver('"3.4"') ...
>>> _check_ver('2.7.15', 'gt', '2.7') True >>> _check_ver('2.7.15', 'gt', '2.7.15') False >>> _check_ver('2.7.15', 'ge', '2.7.15') True >>> _check_ver('2.7.15', 'eq', '2.7.15') True def _check_ver(pyver, op, wanted): ''' >>> _check_ver('2.7.15', 'gt', '2.7') True >>> _check_...
List the packages currently installed in a dict:: {'<package_name>': '<version>'} CLI Example: .. code-block:: bash salt '*' pkg.list_pkgs def list_pkgs(versions_as_list=False, **kwargs): ''' List the packages currently installed in a dict:: {'<package_name>': '<version>'} ...
Removes packages with ``port uninstall``. name The name of the package to be deleted. Multiple Package Options: pkgs A list of packages to delete. Must be passed as a python list. The ``name`` parameter will be ignored if this option is passed. .. versionadded:: 0.16.0 ...
Install the passed package(s) with ``port install`` name The name of the formula to be installed. Note that this parameter is ignored if "pkgs" is passed. CLI Example: .. code-block:: bash salt '*' pkg.install <package name> version Specify a version to p...
Update ports with ``port selfupdate`` CLI Example: .. code-block:: bash salt mac pkg.refresh_db def refresh_db(**kwargs): ''' Update ports with ``port selfupdate`` CLI Example: .. code-block:: bash salt mac pkg.refresh_db ''' # Remove rtag file to keep multiple ref...
Set a value in a db, using a uri in the form of ``sdb://<profile>/<key>``. If the uri provided does not start with ``sdb://`` or the value is not successfully set, return ``False``. CLI Example: .. code-block:: bash salt '*' sdb.set sdb://mymemcached/foo bar def set_(uri, value): ''' ...
Perform a one-time generation of a hash and write it to sdb. If that value has already been set return the value instead. This is useful for generating passwords or keys that are specific to multiple minions that need to be stored somewhere centrally. State Example: .. code-block:: yaml ...
Checks if the ip exists as a temporary rule based on the method supplied, (tempallow, tempdeny). def _temp_exists(method, ip): ''' Checks if the ip exists as a temporary rule based on the method supplied, (tempallow, tempdeny). ''' _type = method.replace('temp', '').upper() cmd = "csf -t | ...
Returns true a rule for the ip already exists based on the method supplied. Returns false if not found. CLI Example: .. code-block:: bash salt '*' csf.exists allow 1.2.3.4 salt '*' csf.exists tempdeny 1.2.3.4 def exists(method, ip, port=None, proto=...
Execute csf command def __csf_cmd(cmd): ''' Execute csf command ''' csf_cmd = '{0} {1}'.format(salt.utils.path.which('csf'), cmd) out = __salt__['cmd.run_all'](csf_cmd) if out['retcode'] != 0: if not out['stderr']: ret = out['stdout'] else: ret = out['st...
Returns the cmd args for csf basic allow/deny commands. def _build_args(method, ip, comment): ''' Returns the cmd args for csf basic allow/deny commands. ''' opt = _get_opt(method) args = '{0} {1}'.format(opt, ip) if comment: args += ' {0}'.format(comment) return args
Handles the cmd execution for allow and deny commands. def _access_rule(method, ip=None, port=None, proto='tcp', direction='in', port_origin='d', ip_origin='d', comment=''): ''' Handles the cmd execu...
Extract comma-separated values from a csf.conf option and return a list. def _csf_to_list(option): ''' Extract comma-separated values from a csf.conf option and return a list. ''' result = [] line = get_option(option) if line: csv = line.split('=')[1].replace(' ', '').replace('"...
Handles the cmd execution for tempdeny and tempallow commands. def _tmp_access_rule(method, ip=None, ttl=None, port=None, direction='in', port_origin='d', ip_origin='d', comment='...
Builds the cmd args for temporary access/deny opts. def _build_tmp_access_args(method, ip, ttl, port, direction, comment): ''' Builds the cmd args for temporary access/deny opts. ''' opt = _get_opt(method) args = '{0} {1} {2}'.format(opt, ip, ttl) if port: args += ' -p {0}'.format(port)...
Add an rule to the temporary ip allow list. See :func:`_access_rule`. 1- Add an IP: CLI Example: .. code-block:: bash salt '*' csf.tempallow 127.0.0.1 3600 port=22 direction='in' comment='# Temp dev ssh access' def tempallow(ip=None, ttl=None, port=None, direction=None, comment=''): ''' ...
Add a rule to the temporary ip deny list. See :func:`_access_rule`. 1- Add an IP: CLI Example: .. code-block:: bash salt '*' csf.tempdeny 127.0.0.1 300 port=22 direction='in' comment='# Brute force attempt' def tempdeny(ip=None, ttl=None, port=None, direction=None, comment=''): ''' Ad...
Add an rule to csf allowed hosts See :func:`_access_rule`. 1- Add an IP: CLI Example: .. code-block:: bash salt '*' csf.allow 127.0.0.1 salt '*' csf.allow 127.0.0.1 comment="Allow localhost" def allow(ip, port=None, proto='tcp', direction='in', port_ori...
Add an rule to csf denied hosts See :func:`_access_rule`. 1- Deny an IP: CLI Example: .. code-block:: bash salt '*' csf.deny 127.0.0.1 salt '*' csf.deny 127.0.0.1 comment="Too localhosty" def deny(ip, port=None, proto='tcp', direction='in', port_origin=...
Fully replace the incoming or outgoing ports line in the csf.conf file - e.g. TCP_IN, TCP_OUT, UDP_IN, UDP_OUT, etc. CLI Example: .. code-block:: bash salt '*' csf.allow_ports ports="[22,80,443,4505,4506]" proto='tcp' direction='in' def allow_ports(ports, proto='tcp', direction='in'): ''...
Lists ports from csf.conf based on direction and protocol. e.g. - TCP_IN, TCP_OUT, UDP_IN, UDP_OUT, etc.. CLI Example: .. code-block:: bash salt '*' csf.allow_port 22 proto='tcp' direction='in' def get_ports(proto='tcp', direction='in'): ''' Lists ports from csf.conf based on direction a...
Like allow_ports, but it will append to the existing entry instead of replacing it. Takes a single port instead of a list of ports. CLI Example: .. code-block:: bash salt '*' csf.allow_port 22 proto='tcp' direction='in' def allow_port(port, proto='tcp', direction='both'): ''' Like al...
Function to run a state with the given chunk via salt-ssh def _ssh_state(chunks, st_kwargs, kwargs, test=False): ''' Function to run a state with the given chunk via salt-ssh ''' file_refs = salt.client.ssh.state.lowstate_file_refs( chunks, _merge_extra_filerefs( ...
Set the return code based on the data back from the state system def _set_retcode(ret, highstate=None): ''' Set the return code based on the data back from the state system ''' # Set default retcode to 0 __context__['retcode'] = 0 if isinstance(ret, list): __context__['retcode'] = 1 ...
Check the pillar for errors, refuse to run the state if there are errors in the pillar and return the pillar errors def _check_pillar(kwargs, pillar=None): ''' Check the pillar for errors, refuse to run the state if there are errors in the pillar and return the pillar errors ''' if kwargs.get('...
Wait for all previously started state jobs to finish running def _wait(jid): ''' Wait for all previously started state jobs to finish running ''' if jid is None: jid = salt.utils.jid.gen_jid(__opts__) states = _prior_running_states(jid) while states: time.sleep(1) states...
Takes a list of filerefs and returns a merged list def _merge_extra_filerefs(*args): ''' Takes a list of filerefs and returns a merged list ''' ret = [] for arg in args: if isinstance(arg, six.string_types): if arg: ret.extend(arg.split(',')) elif isinsta...
Set "slsmod" keys to None to make high_data JSON serializable def _cleanup_slsmod_high_data(high_data): ''' Set "slsmod" keys to None to make high_data JSON serializable ''' for i in six.itervalues(high_data): if 'stateconf' in i: stateconf_data = i['stateconf'][1] ...
Parse modules. def _parse_mods(mods): ''' Parse modules. ''' if isinstance(mods, six.string_types): mods = [item.strip() for item in mods.split(',') if item.strip()] return mods
Create the seed file for a state.sls run def sls(mods, saltenv='base', test=None, exclude=None, **kwargs): ''' Create the seed file for a state.sls run ''' st_kwargs = __salt__.kwargs __opts__['grains'] = __grains__ __pillar__.update(kwargs.get('pillar', {})) opts = salt.utils.state.get_sls...
Return a list of strings that contain state return data if a state function is already running. This function is used to prevent multiple state calls from being run at the same time. CLI Example: .. code-block:: bash salt '*' state.running def running(concurrent=False): ''' Return a ...
Return a list of dicts of prior calls to state functions. This function is used to queue state calls so only one is run at a time. def _prior_running_states(jid): ''' Return a list of dicts of prior calls to state functions. This function is used to queue state calls so only one is run at a time. ...
Utility function to queue the state run if requested and to check for conflicts in currently running states def _check_queue(queue, kwargs): ''' Utility function to queue the state run if requested and to check for conflicts in currently running states ''' if queue: _wait(kwargs.get('__...
Execute a single low data call This function is mostly intended for testing the state system CLI Example: .. code-block:: bash salt '*' state.low '{"state": "pkg", "fun": "installed", "name": "vi"}' def low(data, **kwargs): ''' Execute a single low data call This function is mostly i...
.. versionadded:: 2017.7.3 Request that the local admin execute a state run via `salt-call state.run_request` All arguments match state.apply CLI Example: .. code-block:: bash salt '*' state.request salt '*' state.request test salt '*' state.request test,pkgs def request...
.. versionadded:: 2017.7.3 Clear out the state execution request without executing it CLI Example: .. code-block:: bash salt '*' state.clear_request def clear_request(name=None): ''' .. versionadded:: 2017.7.3 Clear out the state execution request without executing it CLI Exam...
.. versionadded:: 2017.7.3 Execute the pending state request CLI Example: .. code-block:: bash salt '*' state.run_request def run_request(name='default', **kwargs): ''' .. versionadded:: 2017.7.3 Execute the pending state request CLI Example: .. code-block:: bash ...
Retrieve the highstate data from the salt master and display it CLI Example: .. code-block:: bash salt '*' state.show_highstate def show_highstate(**kwargs): ''' Retrieve the highstate data from the salt master and display it CLI Example: .. code-block:: bash salt '*' stat...
List out the low data that will be applied to this minion CLI Example: .. code-block:: bash salt '*' state.show_lowstate def show_lowstate(**kwargs): ''' List out the low data that will be applied to this minion CLI Example: .. code-block:: bash salt '*' state.show_lowstat...
Call a single ID from the named module(s) and handle all requisites The state ID comes *before* the module ID(s) on the command line. id ID to call mods Comma-delimited list of modules to search for given id and its requisites .. versionadded:: 2017.7.3 saltenv : base Sp...
Display the state data from a specific sls or list of sls files on the master CLI Example: .. code-block:: bash salt '*' state.show_sls core,edit.vim dev def show_sls(mods, saltenv='base', test=None, **kwargs): ''' Display the state data from a specific sls or list of sls files on the ...
Return the top data that the minion will use for a highstate CLI Example: .. code-block:: bash salt '*' state.show_top def show_top(**kwargs): ''' Return the top data that the minion will use for a highstate CLI Example: .. code-block:: bash salt '*' state.show_top '''...
.. versionadded:: 2015.5.0 Execute a single state function with the named kwargs, returns False if insufficient data is sent to the command By default, the values of the kwargs will be parsed as YAML. So, you can specify lists values, or lists of single entry key-value maps, as you would in a YAML...
Initialize Datadog connection def _initialize_connection(api_key, app_key): ''' Initialize Datadog connection ''' if api_key is None: raise SaltInvocationError('api_key must be specified') if app_key is None: raise SaltInvocationError('app_key must be specified') options = { ...
Schedule downtime for a scope of monitors. CLI Example: .. code-block:: bash salt-call datadog.schedule_downtime 'host:app2' \\ stop=$(date --date='30 minutes' +%s) \\ app_key='0123456789' \\ ...
Cancel a downtime by id or by scope. CLI Example: .. code-block:: bash salt-call datadog.cancel_downtime scope='host:app01' \\ api_key='0123456789' \\ app_key='9876543210'` Arguments - Either scope or id is requi...
Post an event to the Datadog stream. CLI Example .. code-block:: bash salt-call datadog.post_event api_key='0123456789' \\ app_key='9876543210' \\ title='Salt Highstate' \\ text="Salt highst...
Get the xbps version def _get_version(): ''' Get the xbps version ''' version_string = __salt__['cmd.run']( [_check_xbps(), '--version'], output_loglevel='trace') if version_string is None: # Dunno why it would, but... return False VERSION_MATCH = re.compile(r'(...
List the packages currently installed as a dict:: {'<package_name>': '<version>'} CLI Example: .. code-block:: bash salt '*' pkg.list_pkgs def list_pkgs(versions_as_list=False, **kwargs): ''' List the packages currently installed as a dict:: {'<package_name>': '<version>'} ...
Check whether or not an upgrade is available for all packages CLI Example: .. code-block:: bash salt '*' pkg.list_upgrades def list_upgrades(refresh=True, **kwargs): ''' Check whether or not an upgrade is available for all packages CLI Example: .. code-block:: bash salt '*...
Update list of available packages from installed repos CLI Example: .. code-block:: bash salt '*' pkg.refresh_db def refresh_db(**kwargs): ''' Update list of available packages from installed repos CLI Example: .. code-block:: bash salt '*' pkg.refresh_db ''' # Rem...
Install the passed package name The name of the package to be installed. refresh Whether or not to refresh the package database before installing. fromrepo Specify a package repository (url) to install from. Multiple Package Installation Options: pkgs A list of ...
name The name of the package to be deleted. recursive Also remove dependent packages (not required elsewhere). Default mode: enabled. Multiple Package Options: pkgs A list of packages to delete. Must be passed as a python list. The ``name`` parameter will be ignore...
List all repos known by XBPS CLI Example: .. code-block:: bash salt '*' pkg.list_repos def list_repos(**kwargs): ''' List all repos known by XBPS CLI Example: .. code-block:: bash salt '*' pkg.list_repos ''' repos = {} out = __salt__['cmd.run']('xbps-query -L', o...
Find what file a repo is called in. Helper function for add_repo() and del_repo() repo url of the repo to locate (persistent). rewrite Whether to remove matching repository settings during this process. Returns a list of absolute paths. def _locate_repo_files(repo, rewrite=False): ...
Add an XBPS repository to the system. repo url of repo to add (persistent). conffile path to xbps conf file to add this repo default: /usr/share/xbps.d/15-saltstack.conf CLI Examples: .. code-block:: bash salt '*' pkg.add_repo <repo url> [conffile=/path/to/xbps/repo....
Remove an XBPS repository from the system. repo url of repo to remove (persistent). CLI Examples: .. code-block:: bash salt '*' pkg.del_repo <repo url> def del_repo(repo, **kwargs): ''' Remove an XBPS repository from the system. repo url of repo to remove (persisten...
Ensure an Apache conf is enabled. name Name of the Apache conf def enabled(name): ''' Ensure an Apache conf is enabled. name Name of the Apache conf ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} is_enabled = __salt__['apache.check_conf_enabled'](n...
Returns a list the NTP peers configured on the network device. :return: configured NTP peers as list. CLI Example: .. code-block:: bash salt '*' ntp.peers Example output: .. code-block:: python [ '192.168.0.1', '172.17.17.1', '172.17.17.2', ...
Returns a list of the configured NTP servers on the device. CLI Example: .. code-block:: bash salt '*' ntp.servers Example output: .. code-block:: python [ '192.168.0.1', '172.17.17.1', '172.17.17.2', '2400:cb00:6:1024::c71b:840a' ...
Returns a dictionary containing synchronization details of the NTP peers. :param peer: Returns only the details of a specific NTP peer. :return: a list of dictionaries, with the following keys: * remote * referenceid * synchronized * stratum * type * when ...
Configures a list of NTP peers on the device. :param peers: list of IP Addresses/Domain Names :param test (bool): discard loaded config. By default ``test`` is False (will not dicard the changes) :commit commit (bool): commit loaded config. By default ``commit`` is True (will commit the cha...
Removes NTP servers configured on the device. :param servers: list of IP Addresses/Domain Names to be removed as NTP servers :param test (bool): discard loaded config. By default ``test`` is False (will not dicard the changes) :param commit (bool): commit loaded config. By default ``commit`...
Process the return from Salt def returner(ret): ''' Process the return from Salt ''' job_fun = ret['fun'] job_fun_escaped = job_fun.replace('.', '_') job_id = ret['jid'] job_retcode = ret.get('retcode', 1) job_success = True if not job_retcode else False options = _get_options(ret...
Return events to Elasticsearch Requires that the `event_return` configuration be set in master config. def event_return(events): ''' Return events to Elasticsearch Requires that the `event_return` configuration be set in master config. ''' options = _get_options() index = options['master...
Save the load to the specified jid id .. versionadded:: 2015.8.1 def save_load(jid, load, minions=None): ''' Save the load to the specified jid id .. versionadded:: 2015.8.1 ''' options = _get_options() index = options['master_job_cache_index'] doc_type = options['master_job_cache_do...
Return the load data that marks a specified jid .. versionadded:: 2015.8.1 def get_load(jid): ''' Return the load data that marks a specified jid .. versionadded:: 2015.8.1 ''' options = _get_options() index = options['master_job_cache_index'] doc_type = options['master_job_cache_doc...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Print the status of all known salt minions CLI Example: .. code-block:: bash salt-run manage.status salt-run manage.status tgt="webservers" t...
This routine is used to regenerate all keys in an environment. This is invasive! ALL KEYS IN THE SALT ENVIRONMENT WILL BE REGENERATED!! The key_regen routine sends a command out to minions to revoke the master key and remove all minion keys, it then removes all keys from the master and prompts the user...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Print a list of all the down or unresponsive salt minions Optionally remove keys of down minions CLI Example: .. code-block:: bash salt-run manag...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Print a list of all of the minions that are up CLI Example: .. code-block:: bash salt-run manage.up salt-run manage.up tgt="webservers" tgt_t...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions) ...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent to minion...
.. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions) subset : None Pass ...
.. versionadded:: 2015.5.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent) sub...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions) ...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent) sub...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions) ...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent) sub...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions) ...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent) sub...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions) ...
.. versionadded:: 2015.8.0 .. versionchanged:: 2019.2.0 The 'show_ipv4' argument has been renamed to 'show_ip' as it now includes IPv6 addresses for IPv6-connected minions. Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent) sub...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Accept a minion's public key after checking the fingerprint over salt-ssh CLI Example: .. code-block:: bash salt-run manage.safe_accept my_minion ...
Check the version of active minions CLI Example: .. code-block:: bash salt-run manage.versions def versions(): ''' Check the version of active minions CLI Example: .. code-block:: bash salt-run manage.versions ''' ret = {} client = salt.client.get_local_client(...
Bootstrap minions with salt-bootstrap version : develop Git tag of version to install script : https://bootstrap.saltstack.com URL containing the script to execute hosts Comma-separated hosts [example: hosts='host1.local,host2.local']. These hosts need to exist in the spec...
Bootstrap Windows minions via PsExec. hosts Comma separated list of hosts to deploy the Windows Salt minion. master Address of the Salt master passed as an argument to the installer. version Point release of installer to download. Defaults to the most recent. arch Arc...
Return a dictionary of all available services on the system def _available_services(): ''' Return a dictionary of all available services on the system ''' available_services = dict() for launch_dir in _launchd_paths(): for root, dirs, files in salt.utils.path.os_walk(launch_dir): ...
Return the service info for a service by label, filename or path def _service_by_name(name): ''' Return the service info for a service by label, filename or path ''' services = _available_services() name = name.lower() if name in services: # Match on label return services[name]...