标签:change roles playbook ble code failed role nginx The
1.1ansible之include
[root@m01 playbook]# cat test2.yml
- name: debug
debug: msg="debug"
[root@m01 playbook]#
[root@m01 playbook]# cat test.yml
- hosts: nginx
tasks:
- include: test2.yml
[root@m01 playbook]# ansible-playbook test.yml
PLAY [nginx] **********************************************************************************************
TASK [Gathering Facts] ************************************************************************************
ok: [10.0.0.62]
TASK [debug] **********************************************************************************************
ok: [10.0.0.62] => {
"msg": "debug"
}
PLAY RECAP ************************************************************************************************
10.0.0.62 : ok=2 changed=0 unreachable=0 failed=0
该博主写的认真又详细,稍后我再写自己的吧
http://www.zsythink.net/archives/3063
标签:change roles playbook ble code failed role nginx The
原文地址:https://blog.51cto.com/10983441/2425805