ansible的调用使用
ansile文档
英文文档:
https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html#common-options
中文文档:
https://ansible-book.gitbooks.io/ansible-first-book/
操作模块文档:
http://www.zsythink.net/archives/2542/
https://blog.csdn.net/lcl_xiaowugui/article/details/81878345
https://www.cnblogs.com/kevincaptain/p/10001174.html
模块调用
1、shell模块调用
如,ansible testhost -m shell -a "/bin/bash opt/test.sh"
注意:调用的时候不会将path环境变量带过去,所有命令要写环境变量的命令,以及脚本里面的路径,不能写相对路径
所有的问题都是最后一刻解决,如果没有解决,说明你还没有到最后