ansible批量复制文件到服务器

ansible -i /etc/ansible/hosts.test test -m copy -a "src=/tmp/test dest=/usr/bin/ mode=755 owner=root group=root"

批量解压:

ansible -i /etc/ansible/hosts.test test -m unarchive -a "src=/opt/src/os-first-step.tar dest=/opt/src copy=no"

05-21 20:42