Skip to content

Commit

Permalink
(PE-15351) Use -f option for 2016.2.1+ installs
Browse files Browse the repository at this point in the history
Prior to this commit there was not an option for signalling a
non-interactive install to the installer.
This commit adds the new `-f` option added in
https://github.com/puppetlabs/pe-installer-shim/pull/31 to the
command line options for installation/upgrade.

Additionally, this commit will remove the `-c` parameter being
passed on upgrades from a 2016.2.0+ install, because the installer
should be able to pick up on the existing pe.conf file.
  • Loading branch information
Brandon High committed Jul 6, 2016
1 parent 8f2874f commit 9372dc2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/beaker-pe/install/pe_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,19 @@ def installer_cmd(host, opts)
host.install_from_file("puppet-enterprise-#{version}-#{host['platform']}.swix")
else
pe_debug = host[:pe_debug] || opts[:pe_debug] ? ' -D' : ''
"cd #{host['working_dir']}/#{host['dist']} && ./#{host['pe_installer']}#{pe_debug} #{host['pe_installer_conf_setting']}"
pe_cmd = "cd #{host['working_dir']}/#{host['dist']} && ./#{host['pe_installer']}#{pe_debug}"
if ! version_is_less(host['pe_ver'], '2016.2.1') && !(opts[:type] == :upgrade && version_is_less(host['pe_upgrade_ver'], '2016.2.1') )
# -f option forces non-interactive mode
pe_cmd += " -f"
end

# If there are no answer overrides, and we are doing an upgrade from 2016.2.0,
# we can assume there will be a valid pe.conf in /etc that we can re-use.
if opts[:answers].nil? && opts[:custom_answers].nil? && opts[:type] == :upgrade && !version_is_less(host['pe_ver'], '2016.2.0')
"#{pe_cmd}"
else
"#{pe_cmd} #{host['pe_installer_conf_setting']}"
end
end
end

Expand Down

0 comments on commit 9372dc2

Please sign in to comment.