[ansible-project] Re: New to ansible -- Looping through files with wildcards

2017-08-11 Thread John Harmon
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:

Re: [ansible-project] Re: New to ansible -- Looping through files with wildcards

2017-08-11 Thread Kai Stian Olstad
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

[ansible-project] Re: New to ansible -- Looping through files with wildcards

2017-08-11 Thread John Harmon
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 -