标签:restart serve check name 基础 tor extra 参数 copy
7.ansible命令基础playbook: jenkins.yml
play #1 (dev): dev TAGS: []
tasks:
copy jenkins config.xml TAGS: []
modify jenkins config.xml TAGS: []
ensure restart_pro dir is exists TAGS: []
ensure build_pro dir is exists TAGS: []
copy restart_pro config.xml TAGS: []
copy build_pro config.xml TAGS: []
3)查看hosts
[root@zabbix-server ansible]# ansible-playbook jenkins.yml --list-hosts
playbook: jenkins.yml
play #1 (dev): dev TAGS: []
pattern: [u‘dev‘]
hosts (2):
192.168.70.64
192.168.70.56
4)单独运行某个任务
[root@zabbix-server ansible]# ansible-playbook -i hosts -f 3 --start-at-task=‘copy jenkins config.xml‘
5)动态指定hosts
标签:restart serve check name 基础 tor extra 参数 copy
原文地址:http://blog.51cto.com/zhangdl/2349375