Book description
Leverage the power of Ansible to gain complete control over your systems and automate application deployment
Key Features
- Use Ansible 2.9 to automate and control your infrastructure
- Delve into advanced functionality such as plugins and custom modules in Ansible
- Automate and orchestrate major cloud platforms such as OpenStack, AWS, and Azure using Ansible
Book Description
Ansible enables you to automate software provisioning, configuration management, and application roll-outs, and can be used as a deployment and orchestration tool. While Ansible provides simple yet powerful features to automate multi-layer environments using agentless communication, it can also solve other critical IT challenges, such as ensuring continuous integration and continuous deployment (CI/CD) with zero downtime.
In this book, you'll work with Ansible 2.9 and learn to solve complex issues quickly with the help of task-oriented scenarios. You'll start by installing and configuring Ansible on Linux and macOS to automate monotonous and repetitive IT tasks and get to grips with concepts such as playbooks, inventories, and network modules. As you progress, you'll gain insight into the YAML syntax and learn how to port between Ansible versions. In addition to this, you'll also understand how Ansible enables you to orchestrate multi-layer environments such as networks, containers, and the cloud.
By the end of this Ansible book, you'll be well - versed in writing playbooks and other related Ansible code to overcome just about all of your IT challenges, from infrastructure-as-code provisioning to application deployments, and even handling the mundane day-to-day maintenance tasks that take up so much valuable time.
What you will learn
- Become familiar with the fundamentals of the Ansible framework
- Set up role-based variables and dependencies
- Avoid common mistakes and pitfalls when writing automation code in Ansible
- Extend Ansible by developing your own modules and plugins
- Contribute to the Ansible project by submitting your own code
- Follow best practices for working with cloud environment inventories
- Troubleshoot issues triggered during Ansible playbook runs
Who this book is for
If you are a DevOps engineer, administrator, or any IT professional looking to automate IT tasks using Ansible, this book is for you. Prior knowledge of Ansible is not necessary.
Table of contents
- Title Page
- Copyright and Credits
- About Packt
- Contributors
- Preface
- Section 1: Learning the Fundamentals of Ansible
- Getting Started with Ansible
- Understanding the Fundamentals of Ansible
- Defining Your Inventory
- Playbooks and Roles
- Section 2: Expanding the Capabilities of Ansible
- Consuming and Creating Modules
- Consuming and Creating Plugins
-
Coding Best Practices
- Technical requirements
- The preferred directory layout
- The best approach to cloud inventories
- Differentiating between different environment types
- The proper approach to defining group and host variables
- Using top-level playbooks
- Leveraging version control tools
- Setting OS and distribution variances
- Porting between Ansible versions
- Summary
- Questions
- Further reading
-
Advanced Ansible Topics
- Technical requirements
- Asynchronous versus synchronous actions
- Control play execution for rolling updates
- Configuring the maximum failure percentage
- Setting task execution delegation
- Using the run_once option
- Running playbooks locally
- Working with proxies and jump hosts
- Configuring playbook prompts
- Placing tags in the plays and tasks
- Securing data with Ansible Vault
- Summary
- Questions
- Further reading
- Section 3: Using Ansible in an Enterprise
- Network Automation with Ansible
-
Container and Cloud Management
- Technical requirements
- Designing and building containers with playbooks
- Managing multiple container platforms
- Automating Docker with Ansible
- Exploring container-focused modules
- Automating against Amazon Web Services
- Complementing Google Cloud Platform with automation
- Seamless automation integration to Azure
- Expanding your environment with Rackspace Cloud
- Using Ansible to orchestrate OpenStack
- Summary
- Questions
- Further reading
- Troubleshooting and Testing Strategies
- Getting Started with Ansible Tower
- Assessments
- Other Books You May Enjoy
Product information
- Title: Practical Ansible 2
- Author(s):
- Release date: June 2020
- Publisher(s): Packt Publishing
- ISBN: 9781789807462
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 Advanced
This is the second course in the series on Ansible and in this course, we will …
book
Mastering Ansible - Third Edition
Design, develop, and solve real-world automation and orchestration problems by unlocking the automation capabilities of Ansible. …
book
Ansible: Up and Running, 2nd Edition
Among the many configuration management tools available, Ansible has some distinct advantages—it’s minimal in nature, you …