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:
On 11. aug. 2017 22:59, John Harmon wrote:
Trying this (which doesn't delete the lines yet) but the other problem
is that the shell task is not idempotent
What do you mean by "is not idempotent" it's just listing files and it
need to do that every time.
---
# tasks file for dns_update
Trying this (which doesn't delete the lines yet) but the other problem
is that the shell task is not idempotent
---
# tasks file for dns_update
- name: Retrieve ifcfg files in /etc/sysconfig/network-scripts
shell: ls /etc/sysconfig/network-scripts | grep ^ifcfg-
register: path_files
-