33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# File 'lib/chef/knife/bootstrap/bootstrap_options.rb', line 33
def self.included(includer)
includer.class_eval do
include Knife::WinrmBase
include Knife::BootstrapWindowsBase
deps do
require 'chef/knife/bootstrap'
Chef::Knife::Bootstrap.load_deps
end
option :forward_agent,
:short => "-A",
:long => "--forward-agent",
:description => "Enable SSH agent forwarding",
:boolean => true
option :json_attributes,
:short => "-j JSON",
:long => "--json-attributes JSON",
:description => "A JSON string to be added to the first run of chef-client",
:proc => lambda { |o| JSON.parse(o) }
option :host_key_verify,
:long => "--[no-]host-key-verify",
:description => "Verify host key, enabled by default.",
:boolean => true,
:default => true
option :bootstrap_url,
:long => "--bootstrap-url URL",
:description => "URL to a custom installation script",
:proc => Proc.new { |u| Chef::Config[:knife][:bootstrap_url] = u }
option :bootstrap_wget_options,
:long => "--bootstrap-wget-options OPTIONS",
:description => "Add options to wget when installing chef-client",
:proc => Proc.new { |wo| Chef::Config[:knife][:bootstrap_wget_options] = wo }
option :bootstrap_curl_options,
:long => "--bootstrap-curl-options OPTIONS",
:description => "Add options to curl when install chef-client",
:proc => Proc.new { |co| Chef::Config[:knife][:bootstrap_curl_options] = co }
option :use_sudo_password,
:long => "--use-sudo-password",
:description => "Execute the bootstrap via sudo with password",
:boolean => false
option :extended_logs,
:long => "--extended-logs",
:boolean => true,
:default => false,
:description => "Optional. Provide this option when --bootstrap-protocol is set to 'cloud-api'. It shows chef converge logs in detail."
option :chef_daemon_interval,
:long => "--chef-daemon-interval INTERVAL",
:description => "Optional. Provide this option when --bootstrap-protocol is set to 'cloud-api'.
It specifies the frequency (in minutes) at which the chef-service runs.
Pass 0 if you don't want the chef-service to be installed on the target machine."
option :daemon,
:long => "--daemon DAEMON",
:description => "Optional. Configures the chef-client service for unattended execution. Requires --bootstrap-protocol to be 'cloud-api' and the node platform to be Windows.
Options: 'none' or 'service' or 'task'.
none - Currently prevents the chef-client service from being configured as a service.
service - Configures the chef-client to run automatically in the background as a service.
task - Configures the chef-client to run automatically in the background as a scheduled task."
end
end
|