difference in two file using ansible module

后端 未结 3 532
失恋的感觉
失恋的感觉 2021-01-06 05:16

I want to see if there is any changes in the file one present in local and other on the remote host. If there is any difference, it should be visible in screen what should

3条回答
  •  天涯浪人
    2021-01-06 05:49

    From the command line,

    ansible  -m copy -CD -a "src= dest="
    

    The -m copy option causes Ansible to invoke the copy module

    The -C option causes Ansible to Check whether a change would occur, rather than perform the copy

    The -D option causes Ansible to report what changes would occur if the copy were to be made

    Output is similar to what the UNIX diff command produces, only this reports differences between a local file and remote copies.

提交回复
热议问题