设为首页 加入收藏

TOP

Playbook剧本小结(三)
2019-09-24 11:16:57 】 浏览:160
Tags:Playbook 剧本 小结
: yes #6.如果配置文件发生变化会调用该handlers下面的模块 handlers: - name: Restart Httpd Server service: name=httpd state=restarted

9.Playbook Include

include用来动态的包含tasks任务列表,include_tasks新版/include老版

img

include调用任务方式

#主入口文件
[root@mha ~]# cat main.yml
- hosts: all
  remote_user: root
  tasks:
    - include_tasks: f20.yml
    - include_tasks: f21.yml

#f20.yml
[root@mha ~]# cat f20.yml
- name: create file1
  command: touch file1

#21.yml
[root@mha ~]# cat f21.yml
- name: create file2
  command: touch file2
首页 上一页 1 2 3 4 5 下一页 尾页 3/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇记录SQL Server中一次无法重现的.. 下一篇松软科技web课堂:SQLServer之MIN(..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目