Last active
October 17, 2017 19:04
-
-
Save jodok/e7855cee44c0f818512460a2c1752573 to your computer and use it in GitHub Desktop.
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 | |
yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm | |
yum -y install salt-minion | |
sed -ie 's/#master: salt/master: salt.crate.io/' /etc/salt/minion | |
service salt-minion restart | |
TIMEOUT=600 | |
COUNT=0 | |
while [ ! -f /etc/salt/pki/minion/minion_master.pub ]; do | |
echo "Waiting for salt install." | |
if [ "$COUNT" -ge "$TIMEOUT" ]; then | |
echo "minion_master.pub not detected by timeout" | |
exit 1 | |
fi | |
sleep 5 | |
COUNT=$((COUNT+5)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment