未经书面许可,请勿转载 --- Ansible is the simplest way to automate apps and IT infrastructure
这是Ansible官方网站的介绍,本着学习的态度我决定一边学习一边翻译Ansible configure management这本书,原文下载稍后放出
#一些自解释的文字,我会忽略,或者按照自己的理解简单翻译一下,并非每行每句都是一一对应。
Preface
Since CFEngine was first created by Mark Burgess in 1993, configuration
management tools have been constantly evolving. Followed by the emergence
of more modern tools such as Puppet and Chef, there are now a large number of
choices available to a system administrator.
Ansible is one of the newer tools to arrive into the configuration management space.
Where other tools have focused on completeness and configurability, Ansible has
bucked the trend and, instead, focused on simplicity and ease of use.
In this book, we aim to show you how to use Ansible from the humble
beginnings of its CLI tool, to writing playbooks, and then managing large and
complex environments. Finally, we teach you how to extend Ansible by writing
your own modules.
What this book covers
Chapter 1, Getting Started with Ansible, teaches you the basics of Ansible, how to build
an inventory, how to use modules, and, most importantly, how to get help.
Chapter 2, Simple Playbooks, teaches you how to combine multiple modules to create
Ansible playbooks to manage your hosts.
Chapter 3, Advanced Playbooks, delves deeper into Ansible's scripting language and
teaches you more complex language constructs.
Chapter 4, Larger Projects, teaches you the techniques to scale Ansible configurations
to large deployments containing many complicated systems.
Chapter 5, Custom Modules, teaches you how to expand Ansible beyond its
current capabilities.
What you need for this book
To use this book, you will need at least the following:
· A text editor
· A machine with Linux operating system
· Python 2.6.x
However, to use Ansible to its full effect, you should have several Linux machines
available to be managed.
如何更好的使用本书
一个文本编辑器
2台以上linux机器
python2.6 及以上
Who this book is for
This book is intended for those who want to understand the basics of how Ansible
works. It is expected that you have rudimentary knowledge of how to set up and
configure Linux machines. In parts of the book, we cover the configuration files of
BIND, MySQL, and other Linux daemons; a working knowledge of these would be
helpful, but is certainly not required.
Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.
Code words in text are shown as follows: "We can include other contexts through
the use of the include directive."
A block of code is set as follows:
[group]
machine1
machine2
machine3
[ 2 ]Preface
When we wish to draw your attention to a particular part of a code block,
the relevant lines or items are set in bold:
tasks:
- name: install apache
action: yum name=httpd state=installed
- name: configure apache
copy: src=files/httpd.conf dest=/etc/httpd/conf/httpd.conf
Any command-line input or output is written as follows:
ansible machinename -u root -k -m ping
New terms and important words are shown in bold.