Skip to content

Commit

Permalink
Fixes #28785: Only display Success! once
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Jan 17, 2020
1 parent 7046aa0 commit 6e12ef1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions hooks/boot/02-message-helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ def success_message
end

def server_success_message(kafo)
success_message
say " * <%= color('Foreman', :info) %> is running at <%= color('#{kafo.param('foreman', 'foreman_url').value}', :info) %>"
end

def dev_server_success_message(kafo)
success_message
say " * To run the <%= color('Katello', :info) %> dev server log in using SSH"
say " * Run `cd foreman && bundle exec foreman start`"
say " * The server is running at <%= color('https://#{`hostname -f`}', :info) %>"
Expand All @@ -27,7 +25,6 @@ def certs_generate_command_message
end

def proxy_success_message(kafo)
success_message
foreman_proxy_url = kafo.param('foreman_proxy', 'registered_proxy_url').value || "https://#{kafo.param('foreman_proxy', 'registered_name').value}:#{kafo.param('foreman_proxy', 'ssl_port').value}"
say " * <%= color('Foreman Proxy', :info) %> is running at <%= color('#{foreman_proxy_url}', :info) %>"
end
Expand Down
5 changes: 3 additions & 2 deletions hooks/post/10-post_install_message.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Puppet status codes say 0 for unchanged, 2 for changed succesfully
if [0, 2].include? @kafo.exit_code
# Foreman UI?
if module_enabled? 'foreman'
success_message

if foreman_server?
server_success_message(@kafo)
new_install_message(@kafo) if new_install?
end
Expand Down

0 comments on commit 6e12ef1

Please sign in to comment.