echo -n "supersecret" | gpg --armor --batch --trust-model always --encrypt -r "mysecretkey"
salt-call pillar.get a-secret
Resource: https://fabianlee.org/2016/10/18/saltstack-keeping-salt-pillar-data-encrypted-using-gpg/
There are two essential locations for salt related files (excluding service files):
/etc/salt holds configuration files for the master
and minion, as well as the keys for known minions.
/srv/salt has the state, pillar and reactor files.
Resource: https://implement.pt/2018/10/a-comprehensive-introduction-to-salt/
This will also show minions that are down.
Resource: https://serverfault.com/questions/529049/how-do-i-list-all-connected-salt-stack-minions
Salt states are the equivalent to a cookbook in Chef or a module in Puppet. To create a new one, do the following:
mkdir /srv/salt/<name of state>/srv/salt/<name of state>/init.slsResource: https://implement.pt/2018/10/a-comprehensive-introduction-to-salt/
Alternatively, you can specify one from the command line:
salt '*' state.apply <name of state>
salt '<minion name>' state.apply
Alternatively, you can specify one from the command line:
salt '<minion name>' state.apply <name of state>
salt-call -l debug test.ping