ansible 简单用法

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"

posted @ 2018-04-24 10:42  行知散人  阅读(139)  评论(0编辑  收藏  举报