Skip to content

Commit

Permalink
Use $log.log_hashes to filter out sensitive data.
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed Apr 25, 2017
1 parent a3cafd8 commit e9f0154
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 e9f0154

Please sign in to comment.