Created
June 18, 2012 13:35
-
-
Save bryanwb/2948410 to your computer and use it in GitHub Desktop.
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
bash -c ' | |
yum install -y dmidecode git gcc gcc-c++ automake autoconf make | |
# these shitty packages sometimes sneak in, bloody fingerprint scanner | |
yum remove -f fprintd libfprint | |
authconfig --disablefingerprint --update | |
curl -L http://www.opscode.com/chef/install.sh | sudo bash | |
cd /opt/opscode/ | |
embedded/bin/gem install ruby-shadow pry pry-nav pry-doc | |
./setup.sh | |
mkdir -p /etc/chef | |
service ntpd stop | |
ntpdate 0.pool.ntp.org | |
echo "tinker panic 0" >> /etc/ntp.conf | |
service ntpd start | |
( | |
cat <<'EOP' | |
<%= validation_key %> | |
EOP | |
) > /tmp/validation.pem | |
awk NF /tmp/validation.pem > /etc/chef/validation.pem | |
rm /tmp/validation.pem | |
( | |
cat <<'EOP' | |
<%= config_content %> | |
EOP | |
) > /etc/chef/client.rb | |
<% if @chef_config[:encrypted_data_bag_secret] -%> | |
( | |
cat <<'EOP' | |
<%= encrypted_data_bag_secret %> | |
EOP | |
) > /tmp/encrypted_data_bag_secret | |
awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret | |
rm /tmp/encrypted_data_bag_secret | |
<% end -%> | |
( | |
cat <<'EOP' | |
<%= { "run_list" => @run_list }.to_json %> | |
EOP | |
) > /etc/chef/first-boot.json | |
<%= start_chef %>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment