jcdiy0601 发表于 2016-5-30 15:46:51

include的问题

---
- hosts: test

tasks:
    - include: test_tasks.yml

handlers:
    - include: test_handlers.yml
          
          
-----------------------------
test_tasks.yml

- name: install httpd
yum: pkg=httpd state=installed
notify:
    - start httpd
-----------------------------
test_handlers.yml

- name: start httpd
service: name=httpd state=started
-----------------------------

代码如上所示
handlers加入include后,不执行此操作

天下123 发表于 2016-5-31 11:05:39

这是什么里面的配置文件,没写清楚

jcdiy0601 发表于 2016-5-31 11:18:58

天下123 发表于 2016-5-31 11:05
这是什么里面的配置文件,没写清楚

就是一个简单的测试
主的文件是test.yml
其中task和handlers分别使用include
task没有问题,但是handlers加入include不生效
页: [1]
查看完整版本: include的问题