I’ve looked for this and haven’t found it, so if this is documented elsewhere, I do apologize.
I want to compare the md5 sums of two copies of a list of files. IE there are two locations which should have the same exact files, and I want to compare them. Not all files in the two locations need to match and I have a list of the files that should match
- stat: foo/{{ item }}
with-items: list_of_files
register: foo_stat - stat: bar/{{ item }}
with-items: list_of_files
register: bar_stat - fail: msg=“bar/{{ item }} doesn’t match foo/{{ item }}”
with-items: list_of_files
when: ???
Thanks!
-Dylan