首页 > 其他 > 详细

12.ansible-roles-include(2)

时间:2019-08-02 02:39:10      阅读:110      评论:0      收藏:0      [点我收藏+]
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   

1.2ansible-role

该博主写的认真又详细,稍后我再写自己的吧
http://www.zsythink.net/archives/3063

12.ansible-roles-include(2)

原文:https://blog.51cto.com/10983441/2425805

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!