lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.40.5 vs lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.40.6
- old
+ new
@@ -127,10 +127,17 @@
downloadhost = loadbalancer
end
downloadhost
end
+ #Remove client_datadir on the host
+ #@param [Host] the host
+ def remove_client_datadir(host)
+ client_datadir = host.puppet['client_datadir']
+ on(host, "rm -rf #{client_datadir}")
+ end
+
# Generate the command line string needed to from a frictionless puppet-agent
# install on this host in a PE environment.
#
# @param [Host] host The host to install puppet-agent onto
# @param [Hash] opts The full beaker options
@@ -805,12 +812,11 @@
if host == dashboard
check_console_status_endpoint(host)
end
#Workaround for windows frictionless install, see BKR-943 for the reason
if (host['platform'] =~ /windows/) and (host['roles'].include? 'frictionless')
- client_datadir = host.puppet['client_datadir']
- on(host , puppet("resource file \"#{client_datadir}\" ensure=absent force=true"))
+ remove_client_datadir(host)
end
end
end
# only appropriate for pre-3.9 builds
@@ -1839,11 +1845,10 @@
on agent_nodes, puppet_agent('-t'), :acceptable_exit_codes => [0,2], :run_in_parallel => true
end
#Workaround for windows frictionless install, see BKR-943
agent_nodes.select {|agent| agent['platform'] =~ /windows/}.each do |agent|
- client_datadir = agent.puppet['client_datadir']
- on(agent, puppet("resource file \"#{client_datadir}\" ensure=absent force=true"))
+ remove_client_datadir(agent)
end
end
end
end
end