I can see a file i.e., test.txt on remote1 and remote2 which has version with date and these file contains aren't fixed.
$ cat test.txt
Release_P1.11_2017-08-02-094316
02/08/2017
I wanted to set the condition to check if file contains are same then continue to perform further tasks and if they are not the same then stop the tasks
 ---
   - name: latest file check
     stat:
        path: /tmp/test.txt
        get_checksum: yes
     register: test_file_check
   - debug:
        var: test_file_check.stat.checksum
Checksum value are equal if file contains will be same, otherwise it's not the same.
I am unable to figure it out. Can anyone help me with this?
Thanks