diff options
author | danielsdeleo <dan@chef.io> | 2015-09-24 10:08:59 -0700 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2015-09-24 12:37:26 -0700 |
commit | 33509c1bbb7366d3e2a50f61d8d53161e51eb6fa (patch) | |
tree | 87c71e0b6b30214ee0ab675255f75f2cc71ba1cb /lib/chef/knife | |
parent | 14d7baab6365e0b4146990a5306f80a7f0d09a82 (diff) | |
download | chef-33509c1bbb7366d3e2a50f61d8d53161e51eb6fa.tar.gz |
Add policyfile attributes to client builderpolicyfile-bootstrap-integration
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/bootstrap/client_builder.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef/knife/bootstrap/client_builder.rb b/lib/chef/knife/bootstrap/client_builder.rb index 59b0cabd49..7eb1e22628 100644 --- a/lib/chef/knife/bootstrap/client_builder.rb +++ b/lib/chef/knife/bootstrap/client_builder.rb @@ -91,6 +91,16 @@ class Chef knife_config[:run_list] end + # @return [String] policy_name from the knife_config + def policy_name + knife_config[:policy_name] + end + + # @return [String] policy_group from the knife_config + def policy_group + knife_config[:policy_group] + end + # @return [Hash,Array] Object representation of json first-boot attributes from the knife_config def first_boot_attributes knife_config[:first_boot_attributes] @@ -141,6 +151,8 @@ class Chef node.run_list(normalized_run_list) node.normal_attrs = first_boot_attributes if first_boot_attributes node.environment(environment) if environment + node.policy_name = policy_name if policy_name + node.policy_group = policy_group if policy_group (knife_config[:tags] || []).each do |tag| node.tags << tag end |