Created
November 5, 2017 01:01
-
-
Save dword4/9a69b668cc4ed2d318b358bcf0b4155e to your computer and use it in GitHub Desktop.
simple script to deploy salt-minion on a vm, requires ssh key be copied over first
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 | |
HOST=$1 | |
echo "deploying salt -> $HOST" | |
ssh root@$HOST "yum -y install epel-release && yum -y install salt-minion" | |
ssh root@$HOST "sed -i 's/#master: salt/master: 192.168.1.50/g' /etc/salt/minion" | |
ssh root@$HOST "systemctl start salt-minion && systemctl enable salt-minion" | |
ssh root@$HOST "systemctl stop firewalld && systemctl disable firewalld" | |
echo "salt successfully deployed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment