Created
April 26, 2013 23:28
-
-
Save ConsoleCatzirl/5471106 to your computer and use it in GitHub Desktop.
Install salt-master to run under a service user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
$SALT_HOME=/var/local/salt | |
sudo useradd -m -d $SALT_HOME -r -U -c "Salt Master Daemon" salt | |
mkdir salt | |
cat > salt/master <<EOF | |
user: salt | |
worker_threads: 3 | |
fileserver_backend: | |
- roots | |
file_roots: | |
base: | |
- $SALT_HOME/state | |
pillar_roots: | |
base: | |
- $SALT_HOME/pillar | |
extension_modules: $SALT_HOME/extmods | |
log_level: debug | |
log_file: /var/log/salt/master | |
key_logfile: /var/log/salt/key | |
cachedir: $SALT_HOME/cache | |
pki_dir: $SALT_HOME/pki | |
pidfile: $SALT_HOME/run/master.pid | |
EOF | |
sudo mkdir /var/log/salt /etc/salt | |
sudo chown salt /var/log/salt /etc/salt | |
ln -s /etc/salt $SALT_HOME/etc | |
curl -L http://bootstrap.saltstack.org | sudo sh -s -- -N -M -c `pwd`/salt git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment