Book Image

Hands-On Infrastructure Automation with Ansible [Video]

By : Alan Hohn
4 (1)
Book Image

Hands-On Infrastructure Automation with Ansible [Video]

4 (1)
By: Alan Hohn

Overview of this book

Ansible is an infrastructure automation framework; other examples include Chef, Puppet, and SaltStack. While each framework offers its own unique features, Ansible has an advantage: simplicity. Ansible configuration uses simple, compact, and clean YAML files that are easy to understand and maintain. Ansible is agentless, which means Ansible itself doesn't need to be installed on target machines. At the same time, while Ansible is simple to learn, it is powerful and extensible, making it the perfect choice even for demanding tasks such as configuring an entire OpenStack cluster. This video course will show you how to use Ansible to automate deployment so you can quickly and reliably run and upgrade your applications. You will learn how Infrastructure Automation results in cost reduction, productivity, availability, reliability, and performance. You will follow along step-by-step on a real Ansible deployment of dotCMS, an open-source Content Management System (CMS), which will deliver content to websites, intranets and mobile apps. You will gain real-world experience that will get you started quickly on your own deployments. This will include information on all of Ansible's core concepts and features, including playbooks, tasks, roles, templates, variables, and modules. By the end of the course, you will be able to create and maintain Ansible playbooks, roles, and custom modules, enabling you to make full use of Ansible as part of a DevOps or automation strategy. The code bundle for this video course is available at https://github.com/PacktPublishing/Hands-on-Infrastructure-Automation-with-Ansible
Table of Contents (8 chapters)
Chapter 7
Building Custom Modules for Tasks
Content Locked
Section 4
Module Check Mode and Module Testing
To develop our module, we need to be able to run it in a realistic environment without having to create or run an Ansible playbook. - See how users can use check mode with our module to make sure their tasks are correct - Set up our module file to be run as a top level Python script - Create a file with module arguments and a test script to run our module in test mode