Skip to content

Commit

Permalink
Merge pull request #14878 from lfu/ansible_log_hashes
Browse files Browse the repository at this point in the history
Use $log.log_hashes to filter out sensitive data.
  • Loading branch information
gmcculloug committed Apr 27, 2017
2 parents a42fc27 + e9f0154 commit 6973bda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/models/service_ansible_playbook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ class ServiceAnsiblePlaybook < ServiceGeneric

# A chance for taking options from automate script to override options from a service dialog
def preprocess(action, add_options = {})
_log.info("Override with new options: #{add_options}") unless add_options.blank?
unless add_options.blank?
_log.info("Override with new options:")
$log.log_hashes(add_options)
end

save_job_options(action, add_options)
end

Expand All @@ -12,7 +16,8 @@ def execute(action)
opts = get_job_options(action).deep_merge(:extra_vars => {'manageiq' => manageiq_extra_vars(action)})
hosts = opts.delete(:hosts)

_log.info("Launching Ansible Tower job with options: #{opts}")
_log.info("Launching Ansible Tower job with options:")
$log.log_hashes(opts)
new_job = ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Job.create_job(jt, decrypt_options(opts))
update_job_for_playbook(action, new_job, hosts)

Expand Down

0 comments on commit 6973bda

Please sign in to comment.