Skip to content

Instantly share code, notes, and snippets.

@dword4
Created November 5, 2017 01:01
Show Gist options
  • Save dword4/9a69b668cc4ed2d318b358bcf0b4155e to your computer and use it in GitHub Desktop.
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
#!/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