General management functions for salt, tools like seeing what hosts are up and what hosts are down
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.alived
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.allowed
Bootstrap minions with salt-bootstrap
Git tag of version to install
URL containing the script to execute
Comma-separated hosts [example: hosts='host1.local,host2.local']. These hosts need to exist in the specified roster.
Any additional arguments that you want to pass to the script.
New in version 2016.11.0.
The roster to use for Salt SSH. More information about roster files can be found in Salt's Roster Documentation.
A full list of roster types, see the builtin roster modules documentation.
New in version 2016.11.0.
If user
isn't found in the roster
, a default SSH user can be set here.
Keep in mind that ssh_user
will not override the roster user
value if
it is already defined.
New in version 2016.11.0.
If passwd
isn't found in the roster
, a default SSH password can be set
here. Keep in mind that ssh_password
will not override the roster passwd
value if it is already defined.
New in version 2016.11.0.
If priv
isn't found in the roster
, a default SSH private key can be set
here. Keep in mind that ssh_password
will not override the roster passwd
value if it is already defined.
New in version 2016.11.0.
The temporary directory to download the bootstrap script in. This
directory will have -<uuid4>
appended to it. For example:
/tmp/.bootstrap-a19a728e-d40a-4801-aba9-d00655c143a7/
New in version 2016.11.0.
The backend library to use to download the script. If you need to use
a file:///
URL, then you should set this to urllib2
.
New in version 2016.11.0.
CLI Example:
salt-run manage.bootstrap hosts='host1,host2'
salt-run manage.bootstrap hosts='host1,host2' version='v3004.2'
salt-run manage.bootstrap hosts='host1,host2' version='v3004.2' script='https://bootstrap.saltproject.io/develop'
Bootstrap Windows minions via PsExec.
Comma separated list of hosts to deploy the Windows Salt minion.
Address of the Salt master passed as an argument to the installer.
Point release of installer to download. Defaults to the most recent.
Architecture of installer to download. Defaults to win32.
URL of minion installer executable. Defaults to the latest version from https://repo.saltproject.io/windows/
Optional user name for login on remote computer.
Password for optional username. If omitted, PsExec will prompt for one to be entered for each host.
CLI Example:
salt-run manage.bootstrap_psexec hosts='host1,host2'
salt-run manage.bootstrap_psexec hosts='host1,host2' version='0.17' username='DOMAIN\Administrator'
salt-run manage.bootstrap_psexec hosts='host1,host2' installer_url='http://exampledomain/salt-installer.exe'
Changed in version 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:
salt-run manage.down
salt-run manage.down removekeys=True
salt-run manage.down tgt="webservers" tgt_type="nodegroup"
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.joined
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 to restart the master. The minions will all reconnect and keys will be placed in pending.
After the master is restarted and minion keys are in the pending directory execute a salt-key -A command to accept the regenerated minion keys.
The master must be restarted within 60 seconds of running this command or the minions will think there is something wrong with the keys and abort.
Only Execute this runner after upgrading minions and master to 0.15.1 or higher!
CLI Example:
salt-run manage.key_regen
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.list_not_state
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.list_state
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.not_alived
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.not_allowed
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.not_joined
New in version 2015.5.0.
Changed in version 2019.2.0.
Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.not_present
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are NOT up according to Salt's presence detection (no commands will be sent)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.not_reaped
Changed in version 2019.2.0.
Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.present
New in version 2015.8.0.
Changed in version 2019.2.0.
Print a list of all minions that are up according to Salt's presence detection (no commands will be sent to minions)
Pass in a list of minion ids.
Also show the IP address each minion is connecting from.
CLI Example:
salt-run manage.reaped
Changed in version 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:
salt-run manage.safe_accept my_minion
salt-run manage.safe_accept minion1,minion2 tgt_type=list
Changed in version 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:
salt-run manage.status
salt-run manage.status tgt="webservers" tgt_type="nodegroup"
salt-run manage.status timeout=5 gather_job_timeout=10
Changed in version 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:
salt-run manage.up
salt-run manage.up tgt="webservers" tgt_type="nodegroup"
salt-run manage.up timeout=5 gather_job_timeout=10
Check the version of active minions
CLI Example:
salt-run manage.versions