Skip to content

Commit

Permalink
Merge pull request #12 from highb/feature/pe-15351_non_interactive_fl…
Browse files Browse the repository at this point in the history
…ag_on_installer

(PE-15351) Use -y option for 2016.2.1+ installs
  • Loading branch information
kevpl authored Jul 19, 2016
2 parents e974e7f + d86f4cd commit 5062ede
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')
# -y option sets "assume yes" mode where yes or whatever default will be assumed
pe_cmd += " -y"
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(opts[:HOSTS][host.name][:pe_ver], '2016.2.0')
"#{pe_cmd}"
else
"#{pe_cmd} #{host['pe_installer_conf_setting']}"
end
end
end

Expand Down

0 comments on commit 5062ede

Please sign in to comment.