Skip to content

Instantly share code, notes, and snippets.

@griggheo
Created July 21, 2010 17:28
Show Gist options
  • Save griggheo/484808 to your computer and use it in GitHub Desktop.
Save griggheo/484808 to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
# Add chef master hostname
cat <<EOL > /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.2.170.5 chef.mycloud.com
10.22.162.3 mysite.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
EOL
wget -qO/usr/bin/runurl mysite.com/runurl
chmod 755 /usr/bin/runurl
runurl mysite.com/customize/hostname HOSTNAME
runurl mysite.com/customize/hosts add self
runurl mysite.com/install/chef-client CHEF_ROLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment