Created
August 25, 2013 16:20
-
-
Save HowardMei/6334760 to your computer and use it in GitHub Desktop.
salt init
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/sh | |
HOSTNAME=hostname_here | |
SALT_MASTER=internal_ip_here | |
echo $HOSTNAME > /etc/hostname | |
hostname --file /etc/hostname | |
sed --in-place -e "s/127.0.0.1 localhost/127.0.0.1 $HOSTNAME localhost/" /etc/hosts | |
sed --in-place -e "s/::1 ip6-localhost ip6-loopback/::1 $HOSTNAME ip6-localhost ip6-loopback/" /etc/hosts | |
sed --in-place "2i $SALT_MASTER salt" /etc/hosts | |
add-apt-repository -y ppa:saltstack/salt | |
apt-get update | |
apt-get --yes dist-upgrade | |
apt-get --yes install salt-minion | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment