class Chef::Knife::UserRekey
Public Instance Methods
configure_chef()
click to toggle source
Calls superclass method
ChefWebui::Knife#configure_chef
# File lib/chef/knife/user_rekey.rb, line 16 def configure_chef super init_config_variable(:key_file) end
run()
click to toggle source
# File lib/chef/knife/user_rekey.rb, line 21 def run if name_args.length == 0 ui.error("Must specify organization name to create as the first argument, i.e. knife organization create ORGNAME") exit 1 end webui_session.regenerate_validation_key(name_args[1]) File.open(Chef::Config[:validator_key_file], 'w') do |file| file.write(validation_key) end end