diff options
author | Julian C. Dunn <jdunn@aquezada.com> | 2015-08-03 20:48:54 -0400 |
---|---|---|
committer | Julian C. Dunn <jdunn@aquezada.com> | 2015-08-03 20:49:58 -0400 |
commit | 09a34bc7f3c000ce4b61df61523fc3c4491476cc (patch) | |
tree | 314101a41ab2fd403906eb656f0c6648aba9c449 /lib/chef/knife/bootstrap | |
parent | fe6676bab51390429674b0ecd4670924ffb09cc5 (diff) | |
download | chef-09a34bc7f3c000ce4b61df61523fc3c4491476cc.tar.gz |
Remove old bootstrap templates:
* We don't support installing from gems anymore as a first-class citizen
* Now that the bootstrap template supports regular Bourne shell (not bash), the AIX bootstrap is no longer necessary.
Diffstat (limited to 'lib/chef/knife/bootstrap')
-rw-r--r-- | lib/chef/knife/bootstrap/templates/archlinux-gems.erb | 76 | ||||
-rw-r--r-- | lib/chef/knife/bootstrap/templates/chef-aix.erb | 72 |
2 files changed, 0 insertions, 148 deletions
diff --git a/lib/chef/knife/bootstrap/templates/archlinux-gems.erb b/lib/chef/knife/bootstrap/templates/archlinux-gems.erb deleted file mode 100644 index 55d2c0cc12..0000000000 --- a/lib/chef/knife/bootstrap/templates/archlinux-gems.erb +++ /dev/null @@ -1,76 +0,0 @@ -bash -c ' -<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> - -if [ ! -f /usr/bin/chef-client ]; then - pacman -Syy - pacman -S --noconfirm ruby ntp base-devel - ntpdate -u pool.ntp.org - gem install ohai --no-user-install --no-document --verbose - gem install chef --no-user-install --no-document --verbose <%= Chef::VERSION %> -fi - -mkdir -p /etc/chef - -<% if validation_key -%> -cat > /etc/chef/validation.pem <<'EOP' -<%= validation_key %> -EOP -chmod 0600 /etc/chef/validation.pem -<% end -%> - -<% 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 -%> - -<% if client_pem -%> -cat > /etc/chef/client.pem <<'EOP' -<%= ::File.read(::File.expand_path(client_pem)) %> -EOP -chmod 0600 /etc/chef/client.pem -<% end -%> - -cat > /etc/chef/client.rb <<'EOP' -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] -%> -node_name "<%= @config[:chef_node_name] %>" -<% else -%> -# Using default node name (fqdn) -<% end -%> -# ArchLinux follows the Filesystem Hierarchy Standard -file_cache_path "/var/cache/chef" -file_backup_path "/var/lib/chef/backup" -pid_file "/var/run/chef/client.pid" -cache_options({ :path => "/var/cache/chef/checksums", :skip_expires => true}) -<% if knife_config[:bootstrap_proxy] %> -http_proxy "<%= knife_config[:bootstrap_proxy] %>" -https_proxy "<%= knife_config[:bootstrap_proxy] %>" -<% end -%> -EOP - -cat > /etc/chef/first-boot.json <<'EOP' -<%= Chef::JSONCompat.to_json(first_boot) %> -EOP - -<%= start_chef %>' diff --git a/lib/chef/knife/bootstrap/templates/chef-aix.erb b/lib/chef/knife/bootstrap/templates/chef-aix.erb deleted file mode 100644 index 45fbba7b48..0000000000 --- a/lib/chef/knife/bootstrap/templates/chef-aix.erb +++ /dev/null @@ -1,72 +0,0 @@ -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 - -<% if client_pem -%> -cat > /etc/chef/client.pem <<'EOP' -<%= ::File.read(::File.expand_path(client_pem)) %> -EOP -chmod 0600 /etc/chef/client.pem -<% end -%> - -<% if validation_key -%> -cat > /etc/chef/validation.pem <<'EOP' -<%= validation_key %> -EOP -chmod 0600 /etc/chef/validation.pem -<% end -%> - -<% 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 %>' |