Sha256: f4bfe5e38574e52dd220ae758bed6c1c0c82dac8d809b54c5dc24ea6e8e41856

Contents?: true

Size: 1.48 KB

Versions: 8

Compression:

Stored size: 1.48 KB

Contents

ksh -c '

function exists {
  if type $1 >/dev/null 2>&1
  then
    return 0
  else
    return 1
  fi
}

if ! exists /usr/bin/chef-client; then
  <% if @chef_config[:aix_package] -%>
    # Read the download URL/location from knife.rb with option aix_package
    rm -rf /tmp/chef_installer # ensure there no older pkg
    echo "<%= @chef_config[:aix_package] %>"
    perl -e '\''use LWP::Simple; getprint($ARGV[0]);'\'' <%= @chef_config[:aix_package] %> > /tmp/chef_installer
    installp -aYF -d  /tmp/chef_installer chef
  <% else -%>
     echo ":aix_package location is not set in knife.rb"
     exit
  <% end -%>
fi

mkdir -p /etc/chef

cat > /etc/chef/validation.pem <<'EOP'
<%= validation_key %>
EOP
chmod 0600 /etc/chef/validation.pem

<% if encrypted_data_bag_secret -%>
cat > /etc/chef/encrypted_data_bag_secret <<'EOP'
<%= encrypted_data_bag_secret %>
EOP
chmod 0600 /etc/chef/encrypted_data_bag_secret
<% end -%>

<% unless trusted_certs.empty? -%>
mkdir -p /etc/chef/trusted_certs
<%= trusted_certs %>
<% end -%>

<%# Generate Ohai Hints -%>
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
mkdir -p /etc/chef/ohai/hints

<% @chef_config[:knife][:hints].each do |name, hash| -%>
cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP'
<%= Chef::JSONCompat.to_json(hash) %>
EOP
<% end -%>
<% end -%>

cat > /etc/chef/client.rb <<'EOP'
<%= config_content %>
EOP

cat > /etc/chef/first-boot.json <<'EOP'
<%= Chef::JSONCompat.to_json(first_boot) %>
EOP

<%= start_chef %>'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
chef-12.0.3-x86-mingw32 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.3 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.1-x86-mingw32 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.1 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.0-x86-mingw32 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.0 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.0.rc.0-x86-mingw32 lib/chef/knife/bootstrap/chef-aix.erb
chef-12.0.0.rc.0 lib/chef/knife/bootstrap/chef-aix.erb