lib/beaker-pe/install/pe_utils.rb in beaker-pe-2.11.14 vs lib/beaker-pe/install/pe_utils.rb in beaker-pe-2.11.15
- old
+ new
@@ -420,16 +420,16 @@
else
raise(StandardError, "gpg_key_overwrite requires a valid location: tarball, or pe_repo. #{location} was supplied")
end
if (host['roles'].include?('master') || host['roles'].include?('pe_postgres')) && version_is_less(host[:pe_ver], '2019.8.5') && hosts.any? {|agent| agent['platform'] =~ /(debian)|(ubuntu)|(sles)/}
- on(master, "rm -f #{path_to_gpg_key}")
- on(master, "curl #{gpg_url} --output #{path_to_gpg_key}")
+ on(host, "rm -f #{path_to_gpg_key}")
+ on(host, "curl #{gpg_url} --output #{path_to_gpg_key}")
if location == 'pe_repo'
gpg_key_overwrite(host, 'pe_repo_env')
elsif location == 'pe_repo_env'
- on master, puppet('agent -t'), :acceptable_exit_codes => [0,2]
+ on host, puppet('agent -t'), :acceptable_exit_codes => [0,2]
end
end
end
#Determine the PE package to download/upload per-host, download/upload that package onto the host
@@ -2027,10 +2027,12 @@
deploy_frictionless_to_master(agent)
end
end
end
- gpg_key_overwrite(master, 'pe_repo')
+ if hosts.any? {|host| host['roles'].include?('pe_postgres')}
+ gpg_key_overwrite(pe_postgres, 'pe_repo')
+ end
step "Install agents" do
block_on(agent_nodes, {:run_in_parallel => true}) do |host|
install_ca_cert_on(host, opts)
on(host, installer_cmd(host, opts))