Skip to content

Commit

Permalink
fixes #8008 - display foreman, foreman-proxy and puppet regradless to…
Browse files Browse the repository at this point in the history
… success or fail
  • Loading branch information
shlomizadok committed Nov 12, 2014
1 parent 9eff5bf commit bb5944a
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions hooks/post/10-post_install_message.rb
@@ -1,24 +1,24 @@
# Puppet status codes say 0 for unchanged, 2 for changed succesfully
if [0,2].include? @kafo.exit_code
say " <%= color('Success!', :good) %>"
else
say " <%= color('Something went wrong!', :bad) %> Check the log for ERROR-level output"
end

# Foreman UI?
if @kafo.config.module_enabled? 'foreman'
say " * <%= color('Foreman', :info) %> is running at <%= color('#{param('foreman','foreman_url').value}', :info) %>"
say " Initial credentials are <%= color('#{param('foreman', 'admin_username').value}', :info) %> / <%= color('#{param('foreman', 'admin_password').value}', :info) %>" if param('foreman','authentication').value == true
end
# Foreman UI?
if @kafo.config.module_enabled? 'foreman'
say " * <%= color('Foreman', :info) %> is running at <%= color('#{param('foreman','foreman_url').value}', :info) %>"
say " Initial credentials are <%= color('#{param('foreman', 'admin_username').value}', :info) %> / <%= color('#{param('foreman', 'admin_password').value}', :info) %>" if param('foreman','authentication').value == true
end

# Proxy?
if @kafo.config.module_enabled? 'foreman_proxy'
say " * <%= color('Foreman Proxy', :info) %> is running at <%= color('#{param('foreman_proxy','registered_proxy_url').value}', :info) %>"
end
# Proxy?
if @kafo.config.module_enabled? 'foreman_proxy'
say " * <%= color('Foreman Proxy', :info) %> is running at <%= color('#{param('foreman_proxy','registered_proxy_url').value}', :info) %>"
end

# Puppetmaster?
if ( @kafo.config.module_enabled?('puppet') && ( param('puppet','server').value != false ) )
say " * <%= color('Puppetmaster', :info) %> is running at <%= color('port #{param('puppet','server_port').value}', :info) %>"
end
else
say " <%= color('Something went wrong!', :bad) %> Check the log for ERROR-level output"
# Puppetmaster?
if ( @kafo.config.module_enabled?('puppet') && ( param('puppet','server').value != false ) )
say " * <%= color('Puppetmaster', :info) %> is running at <%= color('port #{param('puppet','server_port').value}', :info) %>"
end

# This is always useful, success or fail
Expand Down

0 comments on commit bb5944a

Please sign in to comment.