Ansible Configuration Management
|Also available on:|
- Starts with the most simple usage of Ansible and builds on that
- Shows how to use Ansible to configure your Linux machines
- Teaches how to extend Ansible to add features you need
- Explains techniques for using Ansible in large, complex environments
Book DetailsLanguage : English
Paperback : 92 pages [ 235mm x 191mm ]
Release Date : November 2013
ISBN : 1783280816
ISBN 13 : 9781783280810
Author(s) : Daniel Hall
Topics and Technologies : All Books, Other, Open Source
Table of ContentsPreface
Chapter 1: Getting Started with Ansible
Chapter 2: Simple Playbooks
Chapter 3: Advanced Playbooks
Chapter 4: Larger Projects
Chapter 5: Custom Modules
- Chapter 1: Getting Started with Ansible
- Installation methods
- Installing from your distribution
- Installing from pip
- Installing from the source code
- Setting up Ansible
- First steps with Ansible
- Module help
- Chapter 2: Simple Playbooks
- The target section
- The variable section
- The task section
- The handlers section
- The playbook modules
- The template module
- The set_fact module
- The pause module
- The wait_for module
- The assemble module
- The add_host module
- The group_by module
- Chapter 3: Advanced Playbooks
- Running operations in parallel
- Conditional execution
- Task delegation
- Extra variables
- The hostvars variable
- The groups variable
- The group_names variable
- The inventory_hostname variable
- The inventory_hostname_short variable
- The inventory_dir variable
- The inventory_file variable
- Finding files with variables
- Environment variables
- External data lookups
- Storing results
- Debugging playbooks
- The debug module
- The verbose mode
- The check mode
- The pause module
- Chapter 4: Larger Projects
- Task includes
- Handler includes
- Playbook includes
- New features in 1.3
- Speeding things up
- Ansible's pull mode
- Chapter 5: Custom Modules
- Writing a module in Bash
- Using a module
- Writing modules in Python
- External inventories
Download the code and support files for this book.
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata- 4 submitted: last submission 21 Jan 2014
Errata type: Code | Page number: 12
The command: $ ansible machinename -m copy -a 'path=/tmp/fstab mode=0700 owner=root'
Should be: $ ansible machinename -m copy -a 'src=/etc/fstab dest=/tmp/fstab'
Errata type: Technical | Page number: 27
Tomcat's init script returns immediately before opening the port. The Tomcat service opens the port before the Java application starts.
Errata type: Code | Page number: 45
The output line should read: TASK: [Print interface] *************
Instead of: TASK: [Print IP address] *************
Errata type: Layouts | Page number: 60
The line "First, we( )installed"
should be "First, we installed"
What you will learn from this book
- Configure your systems and services with Ansible
- Use Ansible command line tools to interrogate systems
- Script Ansible to perform multiple actions with one command
- Build maintainable configurations for large environments
- Learn how and when to use advanced features of Ansible
- Use an inventory that is dynamically generated
- Understand the use of Ansible roles to split your configurations into logical parts
- Extend the functionality of Ansible by writing your own module
Ansible provides a clear and concise way to manage the configuration of your Linux infrastructure. It can help in making your infrastructure more maintainable, quicker to deploy, and easier to understand.
"Ansible Configuration Management" will take you from your very first command all the way to extending the very capabilities of Ansible itself. It takes a practical approach with hands-on examples, which ensures that the readers walk away with all the knowledge and skills they will need to harness Ansible.
"Ansible Configuration Management" starts with an explanation of the basics and builds the reader’s knowledge through step-by-step guidelines.
The book concentrates on discussions related to realistic worked examples. Using this approach we discuss how to perform ad-hoc actions, script actions together to set up services, and how to script more complicated tasks. The discussion carries onto explanation of organising your configurations for large deployments and warps up with examples of how to extend the capabilities of Ansible.
"Ansible Configuration Management" provides the knowledge you require to effectively manage your systems in a simple, quick, and maintainable way.
"Ansible Configuration Management" is a step-by-step tutorial that teaches the use of Ansible for configuring Linux machines.
Who this book is for
This book is intended for anyone looking to understand the basics of Ansible. It is expected that you will have some experience of how to set up and configure Linux machines. In parts of the book we cover configuration files of BIND, MySQL, and other Linux daemons, therefore a working knowledge of these would be helpful but are certainly not required.