摘要: 1、加速模式运行playbook 对于使用ansible 1.5 及之后版本的用户,加速模式只在以下情况下有用处: (A) 管理红帽企业版 Linux 6 或者更早的那些依然使用 paramiko 的版本 (B) 像在文档中描述的那样:无法在 TTYs 中使用 sudo. 2、异步操作和轮询 默认情 阅读全文
posted @ 2018-04-25 20:25 nineep 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 一、Jinja2介绍 Jinja2是基于python的模板引擎,功能比较类似于PHP的smarty,J2ee的Freemarker和velocity。它能完全支持unicode,并具有集成的沙箱执行环境,应用广泛。jinja2使用BSD授权 Jinja2的语法是由variables(变量)和stat 阅读全文
posted @ 2018-04-25 18:56 nineep 阅读(820) 评论(0) 推荐(0) 编辑
摘要: 我们使用查看ansible modules 和plugins 都可通过ansible-doc 命令在终端实现。 具体到ansible role,我们可以使用ansible-galaxy 在终端 search&install roles 也可以在ansible galaxy官网查询roles 命令行工 阅读全文
posted @ 2018-04-25 18:54 nineep 阅读(1131) 评论(0) 推荐(0) 编辑
摘要: 1、inventory文件 1、inventory文件说明: 目标主机的组织编排,灵活的将ad-hoc或plays传递给不同的主机。 主机、plays较少,直接在ansible 根目录使用hosts文件即可, 如果较为复杂,可以创建inventory文件夹,分不同inventory文件: inven 阅读全文
posted @ 2018-04-25 18:50 nineep 阅读(483) 评论(0) 推荐(0) 编辑
摘要: [action plugins] [cache plugins]jsonfilememcachedmemorymongodbpickleredisyaml [callback plugins]actionablecontext_demodebugdefaultdenseforemanfull_ski 阅读全文
posted @ 2018-04-25 18:47 nineep 阅读(247) 评论(0) 推荐(0) 编辑
摘要: ##Some common modules[cloud modules] [clustering modules] [command modules]command - executes a command on a remote nodeexpect - executes a command an 阅读全文
posted @ 2018-04-25 18:45 nineep 阅读(468) 评论(0) 推荐(0) 编辑