lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.40.3 vs lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.40.4
- old
+ new
@@ -1673,9 +1673,23 @@
end
on(master, "cat #{pe_conf_file}")
end
end
+ # Sync pe.conf from the master to another infrastructure node.
+ # Useful when updating pe.conf to reconfigure infrastructure, where
+ # you first update_pe_conf then sync_pe_conf to infrastructure hosts.
+ #
+ # @param [Host] host The host to sync to
+ # @param pe_conf_file [String] The file to sync
+ # (/etc/puppetlabs/enterprise/conf.d/pe.conf by default)
+ def sync_pe_conf(host, pe_conf_file = PE_CONF_FILE)
+ Dir.mktmpdir('sync_pe_conf') do |tmpdir|
+ scp_from(master, pe_conf_file, tmpdir)
+ scp_to(host, File.join(tmpdir, File.basename(pe_conf_file)), pe_conf_file)
+ end
+ end
+
# If the key is unquoted and does not contain pathing ('.'),
# quote to ensure that puppet namespaces are protected
#
# @example
# quoted_hocon_key("puppet_enterprise::database_host")