Book description
Among the many configuration management tools available, Ansible has some distinct advantages—it’s minimal in nature, you don’t need to install anything on your nodes, and it has an easy learning curve. With this updated second edition, you’ll learn how to be productive with this tool quickly, whether you’re a developer deploying code to production or a system administrator looking for a better automation solution.
Publisher resources
Table of contents
- Foreword
- Preface to the Second Edition
- Preface to the First Edition
- 1. Introduction
- 2. Playbooks: A Beginning
-
3. Inventory: Describing Your Servers
- The Inventory File
- Preliminaries: Multiple Vagrant Machines
- Behavioral Inventory Parameters
- Groups and Groups and Groups
- Hosts and Group Variables: Inside the Inventory
- Host and Group Variables: In Their Own Files
- Dynamic Inventory
- Breaking the Inventory into Multiple Files
- Adding Entries at Runtime with add_host and group_by
- 4. Variables and Facts
- 5. Introducing Mezzanine: Our Test Application
-
6. Deploying Mezzanine with Ansible
- Listing Tasks in a Playbook
- Organization of Deployed Files
- Variables and Secret Variables
- Using Iteration (with_items) to Install Multiple Packages
- Adding the Become Clause to a Task
- Updating the Apt Cache
- Checking Out the Project by Using Git
- Installing Mezzanine and Other Packages into a virtualenv
- Complex Arguments in Tasks: A Brief Digression
- Configuring the Database
- Generating the local_settings.py File from a Template
- Running django-manage Commands
- Running Custom Python Scripts in the Context of the Application
- Enabling the Nginx Configuration
- Installing TLS Certificates
- Installing Twitter Cron Job
- The Full Playbook
- Running the Playbook Against a Vagrant Machine
- Troubleshooting
- Deploying Mezzanine on Multiple Machines
- 7. Roles: Scaling Up Your Playbooks
- 8. Complex Playbooks
-
9. Customizing Hosts, Runs, and Handlers
- Patterns for Specifying Hosts
- Limiting Which Hosts Run
- Running a Task on the Control Machine
- Running a Task on a Machine Other Than the Host
- Running on One Host at a Time
- Running on a Batch of Hosts at a Time
- Running Only Once
- Running Strategies
- Advanced Handlers
- Manually Gathering Facts
- Retrieving the IP Address from the Host
- 10. Callback Plugins
- 11. Making Ansible Go Even Faster
-
12. Custom Modules
- Example: Checking That We Can Reach a Remote Server
- Using the Script Module Instead of Writing Your Own
- can_reach as a Module
- Where to Put Custom Modules
- How Ansible Invokes Modules
- Expected Outputs
- Implementing Modules in Python
- Documenting Your Module
- Debugging Your Module
- Implementing the Module in Bash
- Specifying an Alternative Location for Bash
- Example Modules
- 13. Vagrant
-
14. Amazon EC2
- Terminology
- Specifying Credentials
- Prerequisite: Boto Python Library
- Dynamic Inventory
- Defining Dynamic Groups with Tags
- EC2 Virtual Private Cloud and EC2 Classic
- Configuring ansible.cfg for Use with ec2
- Launching New Instances
- EC2 Key Pairs
- Security Groups
- Getting the Latest AMI
- Adding a New Instance to a Group
- Waiting for the Server to Come Up
- Creating Instances the Idempotent Way
- Putting It All Together
- Specifying a Virtual Private Cloud
- Building AMIs
- Other Modules
-
15. Docker
- The Case for Pairing Docker with Ansible
- Docker Application Life Cycle
- Example Application: Ghost
- Connecting to the Docker Daemon
- Running a Container on Our Local Machine
- Building an Image from a Dockerfile
- Orchestrating Multiple Containers on Our Local Machine
- Pushing Our Image to the Docker Registry
- Querying Local Images
- Deploying the Dockerized Application
- Ansible Container
- 16. Debugging Ansible Playbooks
- 17. Managing Windows Hosts
- 18. Ansible for Network Devices
- 19. Ansible Tower: Ansible for the Enterprise
- A. SSH
- B. Using IAM Roles for EC2 Credentials
- Glossary
- Bibliography
- Index
Product information
- Title: Ansible: Up and Running, 2nd Edition
- Author(s):
- Release date: August 2017
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491979808
You might also like
video
Hands-on Ansible
3+ Hours of Video Instruction Hands-on Ansible LiveLessons is focused on hands-on training by providing the …
video
Ansible Fundamentals LiveLessons
4 Hours of Video Instruction 4 hours of video to get you started using Ansible, focusing …
book
Mastering Ansible - Fourth Edition
Design, develop, and solve real-world automation and orchestration problems by unlocking Ansible's automation capabilities Key Features …
book
Kubernetes: Up and Running, 2nd Edition
Kubernetes radically changes the way applications are built and deployed in the cloud. Since its introduction …