Forgive me for responding to myself... I just hope that someone in the
future might find this relevant/useful.
added "changed_when: false" to the shell task. That took care of the
idempotent issue I was seeing by overriding the change result.
Still plugging away on the other issue
- name: Disabling NetworkManager in ifcfg-* files
lineinfile:
path: /etc/sysconfig/network-scripts/{{path_files.stdout_lines}}
regexp: '^NM_CONTROLLED'
line: "NM_CONTROLLED=no"
The above is now returning:
TASK [dns_update : Disabling NetworkManager in ifcfg-* files]
****************************************************************************************************************************************************************************
fatal: [ansibletest-rhel7]: FAILED! => {"changed": false, "failed": true,
"msg": "Destination /etc/sysconfig/network-scripts/[u'ifcfg-bond0',
u'ifcfg-eth0', u'ifcfg-eth1', u'ifcfg-eth2', u'ifcfg-eth3', u'ifcfg-eth4',
u'ifcfg-eth5', u'ifcfg-lo'] does not exist !", "rc": 257}
fatal: [ansibletest-rhel6]: FAILED! => {"changed": false, "failed": true,
"msg": "Destination /etc/sysconfig/network-scripts/[u'ifcfg-bond0',
u'ifcfg-eth0', u'ifcfg-eth1', u'ifcfg-eth2', u'ifcfg-eth3', u'ifcfg-eth4',
u'ifcfg-eth5', u'ifcfg-lo'] does not exist !", "rc": 257}
fatal: [ansibletest-oel6]: FAILED! => {"changed": false, "failed": true,
"msg": "Destination /etc/sysconfig/network-scripts/[u'ifcfg-bond0',
u'ifcfg-eth0', u'ifcfg-eth1', u'ifcfg-eth2', u'ifcfg-eth3', u'ifcfg-eth4',
u'ifcfg-eth5', u'ifcfg-lo'] does not exist !", "rc": 257}
Notice the ifcfg* names are messed up. I am trying to narrow down the
reason
--
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/e77a3ea6-5cc6-442e-812e-46fc7ad2bdb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.