Hi All,
I'm running a loop for deploy multiple passwords into one config file:
- name: setup virtual router passwords
replace: dest=/etc/keepalived/keepalived.conf
regexp='{{ item.pattern }}'
replace='{{ item.password }}'
with_items:
- { pattern: 'virtual_router_id_51_password', password: '{{
virtual_router_id_51_password }}' }
- { pattern: 'virtual_router_id_52_password', password: '{{
virtual_router_id_52_password }}' }
- { pattern: 'virtual_router_id_53_password', password: '{{
virtual_router_id_53_password }}' }
- { pattern: 'virtual_router_id_54_password', password: '{{
virtual_router_id_54_password }}' }
- { pattern: 'virtual_router_id_55_password', password: '{{
virtual_router_id_55_password }}' }
My problem is that when I'm running the playbook it shows in the console
output (and in the log) the passwords, which I definitely would like to
avoid:
TASK: [setup virtual router passwords]
****************************************
changed: [lb1] => (item={'pattern': 'virtual_router_id_51_password',
'password': u'thisisthepassword'})
If I'm degrading this replace to a single replace (so deleting the
with_items completely) then it's fine:
TASK: [setup virtual router passwords]
****************************************
changed: [lb1]
Is somebody have any idea why the passwords are showing up in the loop?
Thanks.
Gabor
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d2530b88-cbca-428a-bc23-fb3e81e8d7bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.