how to compare two files and get files and get the name differenced file name in ansible

HI Fiends,

Please help on this,

Folder1 :Always one file
cat file2
SAM:26

Folder2 : two files

cat file2
RAM:26

cat file 3
SAM:26

Here first folder folder will have always have one file and it is always standard ,

Second folder might have n number of files

We need to compare the first folder file with second older file with column name

EX. File1 SAM is present in second directory file file 3 it is in sync
and file 2 is not in sync with file 1

so we need to capture the file in new directory.