Created
June 15, 2016 23:39
-
-
Save Ham5ter/0e551307adfff52d509160d8f41df832 to your computer and use it in GitHub Desktop.
basic salt-master installation on Ubuntu 16.04
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 | |
# run with root privileges | |
# basic salt-master installation on Ubuntu 16.04 | |
apt-get update | |
apt-get install wget -y | |
wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add - | |
echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list | |
apt-get update | |
apt-get install salt-master salt-minion -y | |
cat << EOF > /etc/salt/master | |
file_ignore_regex: | |
- '/\.svn($|/)' | |
- '/\.git($|/)' | |
hash_type: sha512 | |
base: | |
- /srv/salt | |
EOF | |
service salt-master start | |
cat << EOF > /etc/salt/minion | |
master: $(hostname) | |
master_finger: $(salt-key -F | grep master.pub | awk '{print $2}') | |
EOF | |
service salt-minion start | |
sleep 10 | |
salt-key -a $(cat /etc/salt/minion_id) -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment