原书推荐序 ................................................................................xxiii
前言 .......................................................................................... xxv
第1 章 概述 ................................................................................1
关于版本的说明 .....................................................................................................2
Ansible 的优点 .......................................................................................................2
Ansible 如何运作 ...................................................................................................3
Ansible 的精妙设计有哪些 ....................................................................................4
易读的语法 .....................................................................................................4
远程主机无须安装任何依赖 ...........................................................................5
基于推送模式 ..................................................................................................5
Ansible 管理小规模集群 .................................................................................6
内置模块 .........................................................................................................6
非常轻量的抽象层 ..........................................................................................7
Ansible 太过于简单了吗 ........................................................................................8
我需要具备哪些基础知识 ......................................................................................9
哪些内容不会涉及 .................................................................................................9
安装Ansible.........................................................................................................10
建立一台用于测试的服务器 ................................................................................ 11
使用Vagrant 来创建测试服务器 ................................................................... 11
xiv | 目录
将测试服务器的信息配置在Ansible 中 ........................................................15
使用ansible.cfg 文件来简化配置 ..................................................................16
继续前进 ..............................................................................................................20
第2 章 playbook :一切的开端 ...................................................21
一些准备工作 ......................................................................................................21
一个简单的playbook ...........................................................................................22
指定一个nginx 配置文件 ..............................................................................24
创建一个定制的首页 .....................................................................................25
创建一个webservers 群组 .............................................................................25
运行这个playbook ...............................................................................................26
playbook 是YAML 格式的 ..................................................................................28
文件的起始 ...................................................................................................28
注释 ...............................................................................................................28
字符串 ...........................................................................................................28
布尔型 ...........................................................................................................29
列表 ...............................................................................................................29
字典 ...............................................................................................................30
折行 ...............................................................................................................30
剖析playbook ......................................................................................................31
play..............................................................................................................