SaltStack - SynoCommunity/spksrc GitHub Wiki
SaltStack Documentation
Salt Master
This package is used to send commands and configurations to the Salt minion that is running on managed systems.
Caveats
Salt master is running as non-root: https://docs.saltproject.io/en/latest/ref/configuration/nonroot.html
Salt Minion
This package runs the Salt minion which receives commands and configuration from a Salt master.
Configuration Files
Salt Master: /var/packages/salt-master/etc/salt
Salt Minion: /var/packages/salt-minion/etc/salt
Running salt commands
$ sudo su sc-salt-master -s /usr/bin/bash
$ salt -c /var/packages/salt-master/etc/salt '*' cmd.run 'ls -l'
Example
-
Install both salt-minion and salt-master
-
Add salt-minion to salt-master (via ssh):
$ sudo su sc-salt-master -s /usr/bin/bash
$ salt-key -c /var/packages/salt-master/etc/salt --list all
$ salt-key -c /var/packages/salt-master/etc/salt -a dsm6
# Test and run commands:
$ salt -c /var/packages/salt-master/etc/salt '*' test.ping
$ salt -c /var/packages/salt-master/etc/salt '*' cmd.run 'ls -l'
Troubleshooting
Authentication error occurred.
- Make sure that you are running commands as the salt-master user:
sudo su sc-salt-master -s /usr/bin/bash