Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Fixes #20277 - Adds -y flag to katello-hostname-change
Browse files Browse the repository at this point in the history
  • Loading branch information
John Mitsch committed Jul 11, 2017
1 parent a3c33b3 commit ad8629a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions katello/katello-change-hostname
Expand Up @@ -67,6 +67,10 @@ opt_parser = OptionParser.new do |opt|
end
end

opt.on("-y", "--assumeyes", "Bypass interaction by answering yes") do |confirm|
@options[:confirm] = confirm
end

if @foreman_proxy_content
opt.on("-c",
"--certs-tar CERTS_TAR",
Expand Down Expand Up @@ -199,8 +203,12 @@ def precheck(response)
end
end

STDOUT.print(warning_message)
response = yesno
if @options[:confirm]
response = true
else
STDOUT.print(warning_message)
response = yesno
end
precheck(response)

if @foreman_proxy_content
Expand Down

0 comments on commit ad8629a

Please sign in to comment.