- { username: user1, password: pass1 }
- { username: user2, password: pass2 }
- { username: user3, password: pass3 }
Command: ansible-playbook -v test.yml
Result is shown below!
Any thoughts?
If you use -vv, no_log will not hide anything (I know it is intent to be used with -v only). I personally think it would be nice to have the option to display {{ password }} instead of the real password. I could still benefit from having more information in the log and at the same time not worrying about displaying sensitive information. It is more useful to see something like "echo {{ username }} {{ password }}" in the log rather than "censored": "results hidden due to no_log parameter".
====
root@553a7fa15e9f:/opt/workspace# ansible-playbook -v test.yml
PLAY [127.0.0.1] **************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [shell echo {{ username }} {{ password }}] ******************************
changed: [127.0.0.1] => {"censored": "results hidden due to no_log parameter", "changed": true, "rc": 0}
changed: [127.0.0.1] => {"censored": "results hidden due to no_log parameter", "changed": true, "rc": 0}
changed: [127.0.0.1] => {"censored": "results hidden due to no_log parameter", "changed": true, "rc": 0}
TASK: [fail msg="something bad"] **********************************************
skipping: [127.0.0.1] => (item={u'cmd': u'echo user4 pass4', u'end': u'2014-11-26 03:18:53.800823', u'stderr': u'', u'stdout': u'user4 pass4', u'changed': True, u'rc': 0, 'item': {'username': 'user1', 'password': 'pass1'}, u'warnings': [], u'delta': u'0:00:00.065612', 'invocation': {'module_name': u'shell', 'module_args': u'echo user4 pass4'}, u'start': u'2014-11-26 03:18:53.735211'})
skipping: [127.0.0.1] => (item={u'cmd': u'echo user4 pass4', u'end': u'2014-11-26 03:18:53.917499', u'stderr': u'', u'stdout': u'user4 pass4', u'changed': True, u'rc': 0, 'item': {'username': 'user2', 'password': 'pass2'}, u'warnings': [], u'delta': u'0:00:00.062923', 'invocation': {'module_name': u'shell', 'module_args': u'echo user4 pass4'}, u'start': u'2014-11-26 03:18:53.854576'})
skipping: [127.0.0.1] => (item={u'cmd': u'echo user4 pass4', u'end': u'2014-11-26 03:18:54.030859', u'stderr': u'', u'stdout': u'user4 pass4', u'changed': True, u'rc': 0, 'item': {'username': 'user3', 'password': 'pass3'}, u'warnings': [], u'delta': u'0:00:00.062825', 'invocation': {'module_name': u'shell', 'module_args': u'echo user4 pass4'}, u'start': u'2014-11-26 03:18:53.968034'})
PLAY RECAP ********************************************************************
127.0.0.1 : ok=3 changed=1 unreachable=0 failed=0