ansible 远程目录拷贝
ansible <host> -m copy -a "src=/path/ dest=/path/ <owner=root> <group=root> <mode=0755>"[root@localhost ~]# ansible 192.168.127.129 -m copy -a "src=/etc/passwd dest=/tmp/123.txt owner=nobody group=root mode=0600"
192.168.127.129 | SUCCESS => {
"changed": true,
"checksum": "612a2fc0adc9039c26d249dcb55ce973ba40edaa",
"dest": "/tmp/123.txt",
"gid": 0,
"group": "root",
"md5sum": "02115ff2a990c1651504a1495fc41145",
"mode": "0600",
"owner": "nobody",
"size": 909,
"src": "/root/.ansible/tmp/ansible-tmp-1537967679.72-211199974798374/source",
"state": "file",
"uid": 99
}最后更新于