beaker 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/HISTORY.md +258 -2
- data/beaker.gemspec +2 -1
- data/lib/beaker/answers/version20.rb +0 -1
- data/lib/beaker/answers/version28.rb +0 -1
- data/lib/beaker/answers/version34.rb +1 -1
- data/lib/beaker/command.rb +1 -1
- data/lib/beaker/dsl/helpers.rb +48 -20
- data/lib/beaker/dsl/install_utils.rb +110 -8
- data/lib/beaker/dsl/wrappers.rb +10 -2
- data/lib/beaker/host.rb +133 -18
- data/lib/beaker/host/pswindows.rb +23 -49
- data/lib/beaker/host/pswindows/file.rb +11 -2
- data/lib/beaker/host/pswindows/pkg.rb +12 -6
- data/lib/beaker/host/unix.rb +18 -14
- data/lib/beaker/host/windows.rb +18 -1
- data/lib/beaker/host/windows/file.rb +5 -0
- data/lib/beaker/host_prebuilt_steps.rb +41 -19
- data/lib/beaker/hypervisor.rb +3 -1
- data/lib/beaker/hypervisor/docker.rb +12 -4
- data/lib/beaker/hypervisor/openstack.rb +28 -5
- data/lib/beaker/options/presets.rb +1 -0
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/helpers_spec.rb +69 -22
- data/spec/beaker/dsl/install_utils_spec.rb +82 -4
- data/spec/beaker/dsl/wrappers_spec.rb +2 -2
- data/spec/beaker/host_spec.rb +30 -2
- metadata +18 -4
@@ -168,8 +168,11 @@ module Beaker
|
|
168
168
|
if host['platform'] =~ /windows/
|
169
169
|
log_file = "#{File.basename(host['working_dir'])}.log"
|
170
170
|
pe_debug = host[:pe_debug] || opts[:pe_debug] ? " && cat #{log_file}" : ''
|
171
|
-
|
172
|
-
|
171
|
+
if host.is_cygwin?
|
172
|
+
"cd #{host['working_dir']} && cmd /C 'start /w msiexec.exe /qn /L*V #{log_file} /i #{host['dist']}.msi PUPPET_MASTER_SERVER=#{master} PUPPET_AGENT_CERTNAME=#{host}'#{pe_debug}"
|
173
|
+
else
|
174
|
+
"cd #{host['working_dir']} && msiexec.exe /qn /L*V #{log_file} /i #{host['dist']}.msi PUPPET_MASTER_SERVER=#{master} PUPPET_AGENT_CERTNAME=#{host}#{pe_debug}"
|
175
|
+
end
|
173
176
|
# Frictionless install didn't exist pre-3.2.0, so in that case we fall
|
174
177
|
# through and do a regular install.
|
175
178
|
elsif host['roles'].include? 'frictionless' and ! version_is_less(version, '3.2.0')
|
@@ -347,7 +350,11 @@ module Beaker
|
|
347
350
|
if not link_exists?("#{path}/#{filename}#{extension}")
|
348
351
|
raise "attempting installation on #{host}, #{path}/#{filename}#{extension} does not exist"
|
349
352
|
end
|
350
|
-
|
353
|
+
if host.is_cygwin?
|
354
|
+
on host, "cd #{host['working_dir']}; curl -O #{path}/#{filename}#{extension}"
|
355
|
+
else
|
356
|
+
on host, powershell("$webclient = New-Object System.Net.WebClient; $webclient.DownloadFile('#{path}/#{filename}#{extension}','#{host['working_dir']}\\#{filename}#{extension}')")
|
357
|
+
end
|
351
358
|
end
|
352
359
|
end
|
353
360
|
|
@@ -444,6 +451,7 @@ module Beaker
|
|
444
451
|
# @option opts [String] :pe_ver_win Default PE version to install or upgrade to on Windows hosts
|
445
452
|
# (Otherwise uses individual Windows hosts pe_ver)
|
446
453
|
# @option opts [Symbol] :type (:install) One of :upgrade or :install
|
454
|
+
# @option opts [Boolean] :set_console_password Should we set the PE console password in the answers file? Used during upgrade only.
|
447
455
|
# @option opts [Hash<String>] :answers Pre-set answers based upon ENV vars and defaults
|
448
456
|
# (See {Beaker::Options::Presets.env_vars})
|
449
457
|
#
|
@@ -509,6 +517,10 @@ module Beaker
|
|
509
517
|
install_hosts.each do |host|
|
510
518
|
if host['platform'] =~ /windows/
|
511
519
|
on host, installer_cmd(host, opts)
|
520
|
+
if not host.is_cygwin?
|
521
|
+
# HACK: for some reason, post install we need to refresh the connection to make puppet available for execution
|
522
|
+
host.close
|
523
|
+
end
|
512
524
|
else
|
513
525
|
# We only need answers if we're using the classic installer
|
514
526
|
version = host['pe_ver'] || opts[:pe_ver]
|
@@ -698,7 +710,7 @@ module Beaker
|
|
698
710
|
|
699
711
|
# Certain install paths may not create the config dirs/files needed
|
700
712
|
on host, "mkdir -p #{host['puppetpath']}"
|
701
|
-
on host, "echo '' >> #{host['
|
713
|
+
on host, "echo '' >> #{host.puppet['hiera_config']}"
|
702
714
|
end
|
703
715
|
nil
|
704
716
|
end
|
@@ -719,6 +731,69 @@ module Beaker
|
|
719
731
|
end
|
720
732
|
end
|
721
733
|
|
734
|
+
# Configure puppet.conf for all hosts based upon a provided Hash
|
735
|
+
# @param [Hash{Symbol=>String}] opts
|
736
|
+
# @option opts [Hash{String=>String}] :main configure the main section of puppet.conf
|
737
|
+
# @option opts [Hash{String=>String}] :agent configure the agent section of puppet.conf
|
738
|
+
#
|
739
|
+
# @api dsl
|
740
|
+
# @return nil
|
741
|
+
def configure_puppet(opts={})
|
742
|
+
hosts.each do |host|
|
743
|
+
configure_puppet_on(host,opts)
|
744
|
+
end
|
745
|
+
end
|
746
|
+
|
747
|
+
# Configure puppet.conf on the given host based upon a provided hash
|
748
|
+
# @param [Host] host The host to configure puppet.conf on
|
749
|
+
# @param [Hash{Symbol=>String}] opts
|
750
|
+
# @option opts [Hash{String=>String}] :main configure the main section of puppet.conf
|
751
|
+
# @option opts [Hash{String=>String}] :agent configure the agent section of puppet.conf
|
752
|
+
#
|
753
|
+
# @example will configure /etc/puppet.conf on the puppet master.
|
754
|
+
# config = {
|
755
|
+
# 'main' => {
|
756
|
+
# 'server' => 'testbox.test.local',
|
757
|
+
# 'certname' => 'testbox.test.local',
|
758
|
+
# 'logdir' => '/var/log/puppet',
|
759
|
+
# 'vardir' => '/var/lib/puppet',
|
760
|
+
# 'ssldir' => '/var/lib/puppet/ssl',
|
761
|
+
# 'rundir' => '/var/run/puppet'
|
762
|
+
# },
|
763
|
+
# 'agent' => {
|
764
|
+
# 'environment' => 'dev'
|
765
|
+
# }
|
766
|
+
# }
|
767
|
+
# configure_puppet(master, config)
|
768
|
+
#
|
769
|
+
# @api dsl
|
770
|
+
# @return nil
|
771
|
+
def configure_puppet_on(host, opts = {})
|
772
|
+
if host['platform'] =~ /windows/
|
773
|
+
puppet_conf = "#{host['puppetpath']}\\puppet.conf"
|
774
|
+
conf_data = ''
|
775
|
+
opts.each do |section,options|
|
776
|
+
conf_data << "[#{section}]`n"
|
777
|
+
options.each do |option,value|
|
778
|
+
conf_data << "#{option}=#{value}`n"
|
779
|
+
end
|
780
|
+
conf_data << "`n"
|
781
|
+
end
|
782
|
+
on host, powershell("\$text = \\\"#{conf_data}\\\"; Set-Content -path '#{puppet_conf}' -value \$text")
|
783
|
+
else
|
784
|
+
puppet_conf = "#{host['puppetpath']}/puppet.conf"
|
785
|
+
conf_data = ''
|
786
|
+
opts.each do |section,options|
|
787
|
+
conf_data << "[#{section}]\n"
|
788
|
+
options.each do |option,value|
|
789
|
+
conf_data << "#{option}=#{value}\n"
|
790
|
+
end
|
791
|
+
conf_data << "\n"
|
792
|
+
end
|
793
|
+
on host, "echo \"#{conf_data}\" > #{puppet_conf}"
|
794
|
+
end
|
795
|
+
end
|
796
|
+
|
722
797
|
# Installs Puppet and dependencies using rpm
|
723
798
|
#
|
724
799
|
# @param [Host] host The host to install packages on
|
@@ -813,7 +888,7 @@ module Beaker
|
|
813
888
|
raise "Puppet #{version} at #{link} does not exist!"
|
814
889
|
end
|
815
890
|
|
816
|
-
if host
|
891
|
+
if host.is_cygwin?
|
817
892
|
dest = "#{host['dist']}.msi"
|
818
893
|
on host, "curl -O #{link}"
|
819
894
|
|
@@ -989,6 +1064,12 @@ module Beaker
|
|
989
1064
|
# for Unix like systems and puppet-enterprise-VERSION.msi for Windows systems.
|
990
1065
|
# @api dsl
|
991
1066
|
def upgrade_pe path=nil
|
1067
|
+
set_console_password = false
|
1068
|
+
# if we are upgrading from something lower than 3.4 then we need to set the pe console password
|
1069
|
+
if (dashboard[:pe_ver] ? version_is_less(dashboard[:pe_ver], "3.4.0") : true)
|
1070
|
+
set_console_password = true
|
1071
|
+
end
|
1072
|
+
# get new version information
|
992
1073
|
hosts.each do |host|
|
993
1074
|
host['pe_dir'] = host['pe_upgrade_dir'] || path
|
994
1075
|
if host['platform'] =~ /windows/
|
@@ -1002,8 +1083,8 @@ module Beaker
|
|
1002
1083
|
host['pe_installer'] ||= 'puppet-enterprise-upgrader'
|
1003
1084
|
end
|
1004
1085
|
end
|
1005
|
-
#send in the global options hash
|
1006
|
-
do_install(sorted_hosts, options.merge({:type => :upgrade}))
|
1086
|
+
# send in the global options hash
|
1087
|
+
do_install(sorted_hosts, options.merge({:type => :upgrade, :set_console_password => set_console_password}))
|
1007
1088
|
options['upgrade'] = true
|
1008
1089
|
end
|
1009
1090
|
|
@@ -1202,6 +1283,11 @@ module Beaker
|
|
1202
1283
|
when /^(debian|ubuntu|cumulus)$/
|
1203
1284
|
release_path << "deb/#{codename}"
|
1204
1285
|
release_file = "puppet-agent_#{opts[:version]}-1_#{arch}.deb"
|
1286
|
+
when /^windows$/
|
1287
|
+
release_path << 'windows'
|
1288
|
+
onhost_copy_base = '`cygpath -smF 35`/'
|
1289
|
+
arch_suffix = arch =~ /64/ ? '64' : '86'
|
1290
|
+
release_file = "puppet-agent-x#{arch_suffix}.msi"
|
1205
1291
|
else
|
1206
1292
|
raise "No repository installation step for #{variant} yet..."
|
1207
1293
|
end
|
@@ -1216,6 +1302,10 @@ module Beaker
|
|
1216
1302
|
when /^(debian|ubuntu|cumulus)$/
|
1217
1303
|
on host, "dpkg -i --force-all #{onhost_copied_file}"
|
1218
1304
|
on host, "apt-get update"
|
1305
|
+
when /^windows$/
|
1306
|
+
result = on host, "echo #{onhost_copied_file}"
|
1307
|
+
onhost_copied_file = result.raw_output.chomp
|
1308
|
+
on host, Command.new("start /w #{onhost_copied_file}", [], { :cmdexe => true })
|
1219
1309
|
end
|
1220
1310
|
end
|
1221
1311
|
|
@@ -1325,6 +1415,8 @@ module Beaker
|
|
1325
1415
|
# Location where the module should be installed, will default
|
1326
1416
|
# to host['distmoduledir']/modules
|
1327
1417
|
# @option opts [Array] :ignore_list
|
1418
|
+
# @option opts [String] :protocol
|
1419
|
+
# Name of the underlying transfer method. Valid options are 'scp' or 'rsync'.
|
1328
1420
|
# @raise [ArgumentError] if not host is provided or module_name is not provided and can not be found in Modulefile
|
1329
1421
|
#
|
1330
1422
|
def copy_module_to(one_or_more_hosts, opts = {})
|
@@ -1340,7 +1432,17 @@ module Beaker
|
|
1340
1432
|
else
|
1341
1433
|
_, module_name = parse_for_modulename( source )
|
1342
1434
|
end
|
1343
|
-
|
1435
|
+
|
1436
|
+
opts[:protocol] ||= 'scp'
|
1437
|
+
case opts[:protocol]
|
1438
|
+
when 'scp'
|
1439
|
+
scp_to host, source, File.join(target_module_dir, module_name), {:ignore => ignore_list}
|
1440
|
+
when 'rsync'
|
1441
|
+
rsync_to host, source, File.join(target_module_dir, module_name), {:ignore => ignore_list}
|
1442
|
+
else
|
1443
|
+
logger.debug "Unsupported transfer protocol, returning nil"
|
1444
|
+
nil
|
1445
|
+
end
|
1344
1446
|
end
|
1345
1447
|
end
|
1346
1448
|
alias :copy_root_module_to :copy_module_to
|
data/lib/beaker/dsl/wrappers.rb
CHANGED
@@ -129,9 +129,17 @@ module Beaker
|
|
129
129
|
'NonInteractive' => ''
|
130
130
|
}
|
131
131
|
ps_opts.merge!(args)
|
132
|
+
ps_args = []
|
133
|
+
ps_opts.each do |k, v|
|
134
|
+
if v.eql?('') or v.nil?
|
135
|
+
ps_args << "-#{k}"
|
136
|
+
else
|
137
|
+
ps_args << "-#{k} #{v}"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
ps_args << "-Command #{command}"
|
132
141
|
|
133
|
-
|
134
|
-
Command.new('powershell.exe', arguments, {})
|
142
|
+
Command.new("powershell.exe", ps_args)
|
135
143
|
end
|
136
144
|
end
|
137
145
|
end
|
data/lib/beaker/host.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'socket'
|
2
2
|
require 'timeout'
|
3
3
|
require 'benchmark'
|
4
|
+
require 'rsync'
|
4
5
|
|
5
6
|
[ 'command', 'ssh_connection' ].each do |lib|
|
6
7
|
require "beaker/#{lib}"
|
@@ -144,6 +145,14 @@ module Beaker
|
|
144
145
|
@options.is_pe?
|
145
146
|
end
|
146
147
|
|
148
|
+
def is_cygwin?
|
149
|
+
self['is_cygwin'] == nil || self['is_cygwin'] == true
|
150
|
+
end
|
151
|
+
|
152
|
+
def platform
|
153
|
+
self['platform']
|
154
|
+
end
|
155
|
+
|
147
156
|
# True if this is a pe run, or if the host has had a 'use-service' property set.
|
148
157
|
def use_service_scripts?
|
149
158
|
is_pe? || self['use-service']
|
@@ -202,8 +211,13 @@ module Beaker
|
|
202
211
|
#Examine the host system to determine the architecture
|
203
212
|
#@return [Boolean] true if x86_64, false otherwise
|
204
213
|
def determine_if_x86_64
|
205
|
-
|
206
|
-
|
214
|
+
if is_cygwin?
|
215
|
+
result = exec(Beaker::Command.new("arch | grep x86_64"), :acceptable_exit_codes => (0...127))
|
216
|
+
result.exit_code == 0
|
217
|
+
else
|
218
|
+
result = exec(Beaker::Command.new("wmic os get osarchitecture"), :acceptable_exit_codes => (0...127))
|
219
|
+
result.stdout =~ /64/
|
220
|
+
end
|
207
221
|
end
|
208
222
|
|
209
223
|
#@return [Boolean] true if x86_64, false otherwise
|
@@ -218,16 +232,30 @@ module Beaker
|
|
218
232
|
# host.add_env_var('PATH', '/usr/bin:PATH')
|
219
233
|
def add_env_var key, val
|
220
234
|
key = key.to_s.upcase
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
exec(Beaker::
|
229
|
-
|
230
|
-
|
235
|
+
if self.is_cygwin?
|
236
|
+
env_file = self[:ssh_env_file]
|
237
|
+
escaped_val = Regexp.escape(val).gsub('/', '\/').gsub(';', '\;')
|
238
|
+
#see if the key/value pair already exists
|
239
|
+
if exec(Beaker::Command.new("grep -e #{key}=.*#{escaped_val} #{env_file}"), :acceptable_exit_codes => (0..255) ).exit_code == 0
|
240
|
+
return #nothing to do here, key value pair already exists
|
241
|
+
#see if the key already exists
|
242
|
+
elsif exec(Beaker::Command.new("grep #{key} #{env_file}"), :acceptable_exit_codes => (0..255) ).exit_code == 0
|
243
|
+
exec(Beaker::SedCommand.new(self['HOSTS'][name]['platform'], "s/#{key}=/#{key}=#{escaped_val}:/", env_file))
|
244
|
+
else
|
245
|
+
exec(Beaker::Command.new("echo \"#{key}=#{val}\" >> #{env_file}"))
|
246
|
+
end
|
247
|
+
else #powershell windows
|
248
|
+
#see if the key/value pair already exists
|
249
|
+
result = exec(Beaker::Command.new("set #{key}"), :acceptable_exit_codes => (0..255))
|
250
|
+
subbed_result = result.stdout.chomp
|
251
|
+
if result.exit_code == 0
|
252
|
+
subbed_result = subbed_result.gsub(/#{Regexp.escape(val.gsub(/'|"/, ''))}/, '')
|
253
|
+
end
|
254
|
+
#not present, add it
|
255
|
+
if subbed_result == result.stdout.chomp
|
256
|
+
exec(Beaker::Command.new("setx /M #{key} %#{key}%;#{val}"))
|
257
|
+
exec(Beaker::Command.new("set #{key}=%#{key}%;#{val}"))
|
258
|
+
end
|
231
259
|
end
|
232
260
|
end
|
233
261
|
|
@@ -237,11 +265,25 @@ module Beaker
|
|
237
265
|
#@example
|
238
266
|
# host.delete_env_var('PATH', '/usr/bin:PATH')
|
239
267
|
def delete_env_var key, val
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
268
|
+
key = key.to_s.upcase
|
269
|
+
if self.is_cygwin?
|
270
|
+
val = Regexp.escape(val).gsub('/', '\/').gsub(';', '\;')
|
271
|
+
#if the key only has that single value remove the entire line
|
272
|
+
exec(Beaker::SedCommand.new(self['HOSTS'][name]['platform'], "/#{key}=#{val}$/d", self[:ssh_env_file]))
|
273
|
+
#if the key has multiple values and we only need to remove the provided val
|
274
|
+
exec(Beaker::SedCommand.new(self['HOSTS'][name]['platform'], "s/#{key}=\\(.*[:;]*\\)#{val}[:;]*/#{key}=\\1/", self[:ssh_env_file]))
|
275
|
+
else #powershell windows
|
276
|
+
#get the current value of the key
|
277
|
+
result = exec(Beaker::Command.new("set #{key}"), :acceptable_exit_codes => (0..255))
|
278
|
+
subbed_result = result.stdout.chomp
|
279
|
+
if result.exit_code == 0
|
280
|
+
subbed_result = subbed_result.gsub(/#{Regexp.escape(val.gsub(/'|"/, ''))}/, '')
|
281
|
+
end
|
282
|
+
if subbed_result != result
|
283
|
+
#set to the truncated value
|
284
|
+
self.add_env_var(key, subbed_result)
|
285
|
+
end
|
286
|
+
end
|
245
287
|
end
|
246
288
|
|
247
289
|
def connection
|
@@ -299,7 +341,7 @@ module Beaker
|
|
299
341
|
# @param [String] dir The directory structure to create on the host
|
300
342
|
# @return [Boolean] True, if directory construction succeeded, otherwise False
|
301
343
|
def mkdir_p dir
|
302
|
-
if self
|
344
|
+
if self.is_cygwin?
|
303
345
|
cmd = "mkdir -p #{dir}"
|
304
346
|
else
|
305
347
|
cmd = "if not exist #{dir.gsub!('/','\\')} (md #{dir.gsub!('/','\\')})"
|
@@ -389,6 +431,79 @@ module Beaker
|
|
389
431
|
return result
|
390
432
|
end
|
391
433
|
|
434
|
+
# rsync a file or directory from the localhost to this test host
|
435
|
+
# @param from_path [String] The path to the file/dir to upload
|
436
|
+
# @param to_path [String] The destination path on the host
|
437
|
+
# @param opts [Hash{Symbol=>String}] Options to alter execution
|
438
|
+
# @option opts [Array<String>] :ignore An array of file/dir paths that will not be copied to the host
|
439
|
+
def do_rsync_to from_path, to_path, opts = {}
|
440
|
+
ssh_opts = self['ssh']
|
441
|
+
rsync_args = []
|
442
|
+
ssh_args = []
|
443
|
+
|
444
|
+
if not File.file?(from_path) and not File.directory?(from_path)
|
445
|
+
raise IOError, "No such file or directory - #{from_path}"
|
446
|
+
end
|
447
|
+
|
448
|
+
# We enable achieve mode and compression
|
449
|
+
rsync_args << "-az"
|
450
|
+
|
451
|
+
if not self['user']
|
452
|
+
user = "root"
|
453
|
+
else
|
454
|
+
user = self['user']
|
455
|
+
end
|
456
|
+
hostname_with_user = "#{user}@#{self}"
|
457
|
+
|
458
|
+
Rsync.host = hostname_with_user
|
459
|
+
|
460
|
+
if ssh_opts.has_key?('keys') and
|
461
|
+
ssh_opts.has_key?('auth_methods') and
|
462
|
+
ssh_opts['auth_methods'].include?('publickey')
|
463
|
+
|
464
|
+
key = ssh_opts['keys']
|
465
|
+
|
466
|
+
# If an array was set, then we use the first value
|
467
|
+
if key.is_a? Array
|
468
|
+
key = key.first
|
469
|
+
end
|
470
|
+
|
471
|
+
# We need to expand tilde manually as rsync can be
|
472
|
+
# funny sometimes
|
473
|
+
key = File.expand_path(key)
|
474
|
+
|
475
|
+
ssh_args << "-i #{key}"
|
476
|
+
end
|
477
|
+
|
478
|
+
if ssh_opts.has_key?('port') and
|
479
|
+
ssh_args << "-p #{ssh_opts['port']}"
|
480
|
+
end
|
481
|
+
|
482
|
+
# We disable prompt when host isn't known
|
483
|
+
ssh_args << "-o 'StrictHostKeyChecking no'"
|
484
|
+
|
485
|
+
if not ssh_args.empty?
|
486
|
+
rsync_args << "-e \"ssh #{ssh_args.join(' ')}\""
|
487
|
+
end
|
488
|
+
|
489
|
+
if opts.has_key?(:ignore) and not opts[:ignore].empty?
|
490
|
+
opts[:ignore].map! do |value|
|
491
|
+
"--exclude '#{value}'"
|
492
|
+
end
|
493
|
+
rsync_args << opts[:ignore].join(' ')
|
494
|
+
end
|
495
|
+
|
496
|
+
# We assume that the *contents* of the directory 'from_path' needs to be
|
497
|
+
# copied into the directory 'to_path'
|
498
|
+
if File.directory?(from_path) and not from_path.end_with?('/')
|
499
|
+
from_path += '/'
|
500
|
+
end
|
501
|
+
|
502
|
+
@logger.notify "rsync: localhost:#{from_path} to #{hostname_with_user}:#{to_path} {:ignore => #{opts[:ignore]}}"
|
503
|
+
result = Rsync.run(from_path, to_path, rsync_args)
|
504
|
+
result
|
505
|
+
end
|
506
|
+
|
392
507
|
end
|
393
508
|
|
394
509
|
[ 'windows', 'pswindows', 'unix', 'aix', 'mac' ].each do |lib|
|
@@ -20,7 +20,7 @@ module PSWindows
|
|
20
20
|
'user' => 'Administrator',
|
21
21
|
'group' => 'Administrators',
|
22
22
|
'distmoduledir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc\\modules',
|
23
|
-
'sitemoduledir'
|
23
|
+
'sitemoduledir' => 'C:\\usr\\share\\puppet\\modules',
|
24
24
|
'puppetservice' => 'pe-httpd',
|
25
25
|
'pathseparator' => ';',
|
26
26
|
'puppetpath' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc',
|
@@ -28,52 +28,26 @@ module PSWindows
|
|
28
28
|
'puppetcodedir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc',
|
29
29
|
'hieraconf' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc\\hiera.yaml',
|
30
30
|
'puppetvardir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\var',
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
h.merge({
|
35
|
-
'puppetbindir' => 'C:\\Program Files (x86)\\PuppetLabs\\Puppet Enterprise\\bin'
|
36
|
-
})
|
37
|
-
else
|
38
|
-
h.merge({
|
39
|
-
'puppetbindir' => 'C:\\Program Files\\PuppetLabs\\Puppet Enterprise\\bin'
|
40
|
-
})
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def self.foss_defaults
|
45
|
-
h = Beaker::Options::OptionsHash.new
|
46
|
-
h.merge({
|
47
|
-
'user' => 'Administrator',
|
48
|
-
'group' => 'Administrators',
|
49
|
-
'distmoduledir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc\\modules',
|
50
|
-
'sitemoduledir' => 'C:\\usr\\share\\puppet\\modules',
|
51
|
-
'hieralibdir' => 'C:\\opt\\puppet-git-repos\\hiera\\lib',
|
52
|
-
'hierapuppetlibdir' => 'C:\\opt\\puppet-git-repos\\hiera-puppet\\lib',
|
53
|
-
'hierabindir' => 'C:\\opt\\puppet-git-repos\\hiera\\bin',
|
54
|
-
'pathseparator' => ';'
|
55
|
-
})
|
56
|
-
|
57
|
-
if h['platform'] && h['platform'].include?('amd64')
|
58
|
-
h.merge({
|
59
|
-
'puppetpath' => "C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc",
|
60
|
-
'puppetconfdir' => "C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc",
|
61
|
-
'puppetcodedir' => "C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc",
|
62
|
-
'hieraconf' => "C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc\\hiera.yaml",
|
63
|
-
'puppetvardir' => 'C:\\Program Files (x86)\\Puppet Labs\\Puppet\\var',
|
64
|
-
'puppetbindir' => "C:\\Program Files (x86)\\Puppet Labs\\Puppet\\bin"
|
65
|
-
})
|
66
|
-
else
|
67
|
-
h.merge({
|
68
|
-
'puppetpath' => "C:\\Program Files\\Puppet Labs\\Puppet\\etc",
|
69
|
-
'puppetconfdir' => "C:\\Program Files\\Puppet Labs\\Puppet\\etc",
|
70
|
-
'puppetcodedir' => "C:\\Program Files\\Puppet Labs\\Puppet\\etc",
|
71
|
-
'hieraconf' => "C:\\Program Files\\Puppet Labs\\Puppet\\etc\\hiera.yaml",
|
72
|
-
'puppetvardir' => 'C:\\Program Files\\Puppet Labs\\Puppet\\var',
|
73
|
-
'puppetbindir' => "C:\\Program Files\\Puppet Labs\\Puppet\\bin"
|
74
|
-
})
|
75
|
-
end
|
31
|
+
'puppetbindir' => '"C:\\Program Files (x86)\\PuppetLabs\\Puppet Enterprise\\bin";"C:\\Program Files\\PuppetLabs\\Puppet Enterprise\\bin"'
|
32
|
+
})
|
33
|
+
end
|
76
34
|
|
77
|
-
|
78
|
-
|
79
|
-
|
35
|
+
def self.foss_defaults
|
36
|
+
h = Beaker::Options::OptionsHash.new
|
37
|
+
h.merge({
|
38
|
+
'user' => 'Administrator',
|
39
|
+
'group' => 'Administrators',
|
40
|
+
'distmoduledir' => 'C:\\ProgramData\\PuppetLabs\\puppet\\etc\\modules',
|
41
|
+
'sitemoduledir' => 'C:\\usr\\share\\puppet\\modules',
|
42
|
+
'hieralibdir' => 'C:\\opt\\puppet-git-repos\\hiera\\lib',
|
43
|
+
'hierapuppetlibdir' => 'C:\\opt\\puppet-git-repos\\hiera-puppet\\lib',
|
44
|
+
'hierabindir' => 'C:\\opt\\puppet-git-repos\\hiera\\bin',
|
45
|
+
'pathseparator' => ';',
|
46
|
+
'puppetpath' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc";"C:\\Program Files\\Puppet Labs\\Puppet\\etc"',
|
47
|
+
'hieraconf' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\etc\\hiera.yaml";"C:\\Program Files\\Puppet Labs\\Puppet\\etc\\hiera.yaml"',
|
48
|
+
'puppetvardir' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\var";"C:\\Program Files\\Puppet Labs\\Puppet\\var"',
|
49
|
+
'puppetbindir' => '"C:\\Program Files (x86)\\Puppet Labs\\Puppet\\bin";"C:\\Program Files\\Puppet Labs\\Puppet\\bin"',
|
50
|
+
})
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|