summaryrefslogtreecommitdiff
path: root/lib/chef/knife/bootstrap
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2016-02-04 16:46:25 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2016-02-24 21:24:14 -0800
commitd0f2106071bf6cd8caf41555fe1a1784b3aff1fa (patch)
tree14a060e04917b139d4499542f41c7557654df3c4 /lib/chef/knife/bootstrap
parent0584f32a8cbc82db9b1361e7a3a9f42bfbe5af51 (diff)
downloadchef-d0f2106071bf6cd8caf41555fe1a1784b3aff1fa.tar.gz
Copy client.d files during bootstrap
When knife finds a client.d/ directory, it will upload all files nested under that directory.
Diffstat (limited to 'lib/chef/knife/bootstrap')
-rw-r--r--lib/chef/knife/bootstrap/templates/chef-full.erb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/knife/bootstrap/templates/chef-full.erb b/lib/chef/knife/bootstrap/templates/chef-full.erb
index 020645c869..6007ff9859 100644
--- a/lib/chef/knife/bootstrap/templates/chef-full.erb
+++ b/lib/chef/knife/bootstrap/templates/chef-full.erb
@@ -226,6 +226,11 @@ cat > /etc/chef/first-boot.json <<EOP
<%= Chef::JSONCompat.to_json(first_boot) %>
EOP
+<% unless client_d.empty? -%>
+mkdir -p /etc/chef/client.d
+<%= client_d %>
+<% end -%>
+
echo "Starting the first Chef Client run..."
<%= start_chef %>'