diff options
author | Sean Walberg <sean@ertw.com> | 2015-04-05 00:10:57 -0500 |
---|---|---|
committer | Sean Walberg <sean@ertw.com> | 2015-04-05 00:10:57 -0500 |
commit | 4cdce72a39b6f2e9ad0eb3029d861c99494738f0 (patch) | |
tree | 7da84564e60bee3eef0f0266d818d6230cf98219 /lib/chef/knife/bootstrap.rb | |
parent | 361ba778a36b9da6e29ece85c124babcbfaabdd8 (diff) | |
download | chef-4cdce72a39b6f2e9ad0eb3029d861c99494738f0.tar.gz |
Allow tags to be set on a node during bootstrap
I can set attributes, environment, and run_list, but why not tags?
Some of our recipes are driven off of tags, such as for sudo access or
membership in a load balancing pool.
If this patch is accepted then I will add the corresponding feature to
knife-vsphere.
This patch only works with the new vault method, not the validator key
method. If someone has some pointers on where to add it in the validator
method I'd be happy to amend.
Diffstat (limited to 'lib/chef/knife/bootstrap.rb')
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index a4095e8402..157c815a98 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -143,6 +143,12 @@ class Chef :proc => lambda { |o| o.split(/[\s,]+/) }, :default => [] + option :tags, + :long => "--tags TAGS", + :description => "Comma separated list of tags to apply to the node", + :proc => lambda { |o| o.split(/[\s,]+/) }, + :default => [] + option :first_boot_attributes, :short => "-j JSON_ATTRIBS", :long => "--json-attributes", |