summaryrefslogtreecommitdiff
path: root/lib/chef/knife/configure.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /lib/chef/knife/configure.rb
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'lib/chef/knife/configure.rb')
-rw-r--r--lib/chef/knife/configure.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/knife/configure.rb b/lib/chef/knife/configure.rb
index 8bb8930aee..f4d539aa13 100644
--- a/lib/chef/knife/configure.rb
+++ b/lib/chef/knife/configure.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/knife'
+require "chef/knife"
class Chef
class Knife
@@ -25,7 +25,7 @@ class Chef
attr_reader :chef_repo, :new_client_key, :validation_client_name, :validation_key
deps do
- require 'ohai'
+ require "ohai"
Chef::Knife::ClientCreate.load_deps
Chef::Knife::UserCreate.load_deps
end
@@ -61,7 +61,7 @@ class Chef
def configure_chef
# We are just faking out the system so that you can do this without a key specified
- Chef::Config[:node_name] = 'woot'
+ Chef::Config[:node_name] = "woot"
super
Chef::Config[:node_name] = nil
end
@@ -136,14 +136,14 @@ EOH
@chef_server = config[:chef_server_url] || ask_question("Please enter the chef server URL: ", :default => "https://#{server_name}:443")
if config[:initial]
@new_client_name = config[:node_name] || ask_question("Please enter a name for the new user: ", :default => Etc.getlogin)
- @admin_client_name = config[:admin_client_name] || ask_question("Please enter the existing admin name: ", :default => 'admin')
- @admin_client_key = config[:admin_client_key] || ask_question("Please enter the location of the existing admin's private key: ", :default => '/etc/chef-server/admin.pem')
+ @admin_client_name = config[:admin_client_name] || ask_question("Please enter the existing admin name: ", :default => "admin")
+ @admin_client_key = config[:admin_client_key] || ask_question("Please enter the location of the existing admin's private key: ", :default => "/etc/chef-server/admin.pem")
@admin_client_key = File.expand_path(@admin_client_key)
else
@new_client_name = config[:node_name] || ask_question("Please enter an existing username or clientname for the API: ", :default => Etc.getlogin)
end
- @validation_client_name = config[:validation_client_name] || ask_question("Please enter the validation clientname: ", :default => 'chef-validator')
- @validation_key = config[:validation_key] || ask_question("Please enter the location of the validation key: ", :default => '/etc/chef-server/chef-validator.pem')
+ @validation_client_name = config[:validation_client_name] || ask_question("Please enter the validation clientname: ", :default => "chef-validator")
+ @validation_key = config[:validation_key] || ask_question("Please enter the location of the validation key: ", :default => "/etc/chef-server/chef-validator.pem")
@validation_key = File.expand_path(@validation_key)
@chef_repo = config[:repository] || ask_question("Please enter the path to a chef repository (or leave blank): ")
@@ -154,9 +154,9 @@ EOH
def guess_servername
o = Ohai::System.new
o.load_plugins
- o.require_plugin 'os'
- o.require_plugin 'hostname'
- o[:fqdn] || o[:machinename] || o[:hostname] || 'localhost'
+ o.require_plugin "os"
+ o.require_plugin "hostname"
+ o[:fqdn] || o[:machinename] || o[:hostname] || "localhost"
end
def config_file