ansible之copy模块测试
模块简单介绍:
各模块位置(default=/usr/share/ansible)
各模块使用说明可以用“ansible-doc 【模块名称】”的方式查询,也可以使用-s蚕食来指定模块查询使用说明。
ansible-doc -s copy
例:把主控端/root 目录下的test.sh 文件拷贝到到指定节点上
测试文件test.sh
ansible all -m copy -a “src=/root/test.sh dest=/tmp/”
[root@master ~]# ansible all -m copy -a “src=/root/test.sh dest=/tmp/”
如果执行过程中出现错误;解决方法:
错误:
解决:关闭防火墙和selinux