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

Commit

Permalink
update based on code comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
chambridge committed Dec 18, 2017
1 parent 441b62b commit 5fee1e4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions rho/ansible_utils.py
Expand Up @@ -19,7 +19,7 @@
import yaml

from rho import utilities
from rho.utilities import log, ANSIBLE_LOG_PATH, str_to_ascii, iteritems
from rho.utilities import log, ANSIBLE_LOG_PATH, str_to_ascii


def auth_as_ansible_host_vars(auth):
Expand Down Expand Up @@ -72,14 +72,11 @@ def log_yaml_inventory(label, inventory):

redact_key_list = ['ansible_become_pass', 'ansible_ssh_pass']

groups = list(inventory.keys())

for group in groups:
for group in inventory.keys():
hosts_dict = inventory[group].get('hosts')
vars_dict = inventory[group].get('vars')

# pylint: disable=unused-variable
for host, host_dict in iteritems(hosts_dict):
for host_dict in hosts_dict.values():
host_dict = redact_dict(redact_key_list, host_dict)

vars_dict = redact_dict(redact_key_list, vars_dict)
Expand Down

0 comments on commit 5fee1e4

Please sign in to comment.