Skip to content

Instantly share code, notes, and snippets.

@HowardMei
Created August 25, 2013 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HowardMei/6334760 to your computer and use it in GitHub Desktop.
Save HowardMei/6334760 to your computer and use it in GitHub Desktop.
salt init
#!/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