Created
July 26, 2018 08:25
-
-
Save foxutech/2cc0341474a46c1202fd3f787e94346c to your computer and use it in GitHub Desktop.
salt-master installation on Ubuntu 16.04 https://foxutech.com
This file contains hidden or 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 | |
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