Salt Configuration Management Cheat sheet

Delete a user:

sudo salt ‘minion-name’ user.delete username remove=True force=True

Test states:

sudo salt ‘minion-name’ state.test

Useful master configuration

sudo vim /etc/salt/master.d/state-verbose.conf

state_verbose: False

sudo vim /etc/salt/master.d/timeout.conf

timeout: 15

Troubleshooting

Run minion in debug mode

sudo systemctl stop salt-minion

sudo salt-minion -l debug

Can’t perform a sudo salt ‘minion-name’ test.ping:

Log on to minion and set to run in debug if no communication from master check the value of `source address` in /etc/salt/minion.d/base.conf

Upgrading to Onedir (on Ubuntu)

Salt classic is being retired – it will not longer be packaged after version 3005. Onedir (which packages everything, including python, required to run salt in one directory) is the future. To upgrade a new gpg key is required.