How to compare two files in ansible ..

217 views
Skip to first unread message

shame...@gmail.com

unread,
Sep 19, 2016, 1:18:00 PM9/19/16
to Ansible Project
Friends ,

Please help me on this

How to compare two DIRECOTY files in ansible .. i have one file called text.sh it is in one directory and i have two files in other diretory how to compare these two file , if no difference need to print no difference , else it need to print file has differen


FIRST DIRECTOYR

CAT SAM.TXT
RAMESH:GANESH

SECOND DIRECTOY HAS TWO FILES 
ls -l
ram.txt
ganessh.txt


cat ram.txt 
RAMESH:GANESH

cat ganessh.txt
sankar:ganesh


Now we have to compare the two folder , first folder alwasy contain one single file ,but second folder contact any number of files, Need to compare and if difference found we need to print there is difference in file.

Thanks
Shameer

Reply all
Reply to author
Forward
0 new messages