-
-
Save raucao/2701950 to your computer and use it in GitHub Desktop.
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
sh -c ' | |
portsnap fetch | |
portsnap extract | |
BATCH=yes | |
export BATCH | |
echo "RUBY_DEFAULT_VER=1.9" >> /etc/make.conf | |
pkg_add -r autoconf | |
cd /usr/ports/converters/ruby-iconv | |
make install | |
gem install chef --no-ri --no-rdoc | |
mkdir /etc/chef | |
cat <<EOF > /tmp/validation.pem | |
<%= IO.read(Chef::Config[:validation_key]) %> | |
EOF | |
awk NF /tmp/validation.pem > /etc/chef/validation.pem | |
cat <<EOF > /etc/chef/client.rb | |
log_level :info | |
log_location STDOUT | |
chef_server_url "<%= Chef::Config[:chef_server_url] %>" | |
validation_client_name "<%= Chef::Config[:validation_client_name] %>" | |
<% if @config[:chef_node_name] == nil %> | |
# Using default node name" | |
<% else %> | |
node_name "<%= @config[:chef_node_name] %>" | |
<% end %> | |
EOF | |
cat <<EOF > /etc/chef/first-boot.json | |
<%= { "run_list" => @run_list }.to_json %> | |
EOF | |
/usr/local/bin/chef-client -j /etc/chef/first-boot.json' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment