一、stat模块
stat模块类似linux的stat命令,用于获取文件的状态信息。
https://docs.ansible.com/ansible/latest/modules/stat_module.html#stat-module
获取/etc/fstab文件的状态信息
[root@manage01 ~]# ansible -m stat 192.168.8.21 -a "path=/etc/fstab"
192.168.8.21 | SUCCESS => {
"ansible_facts": {
"...