To run several masters on one server, we provide different
configuration directories, and map staging directories to
them.
The salt-get-config-dir command gives the config dir to
use in stdout, or return 1 as exit code if that can't be
determined.
The salt-wrapper command generates the proper salt
command prepending sudo and appending --config-dir.
Examples:
- salt-wrapper salt-call --local test.ping
- salt-wrapper salt '*' state.highstate
The map is stored in /usr/local/etc/salt-wrapper.conf
as a JSON document containing a roots array, each entry
an object with config and states property:
{ "roots": [ { "config": "/usr/local/etc/salt-woodscloud", "states": "/opt/woodscloud-operations" }, { "config": "/usr/local/etc/salt", "states": "/opt/nasqueron-operations" } ] }