
Installing Ansible is easy through Python packages. To use it, we also need to understand how to configure SSH and sudo. In this video we will see that.
In this video we will use our configured Ansible to run commands across multiple machines.
In this video we will learn to run Ansible consistently against a set of systems, we need to record a list in the format Ansible expects.
In this video we will learn to specify the list of tasks Ansible should automate, we need to understand playbook files.
In this video, we will see how Ansible can apply the same configuration and plays to multiple systems using groups.
Ansible has a lot of modules, and a new user needs to know which ones are most important and how they work.
To build our own roles, we need to understand how handlers, files, and templates are used in a role.
Ansible roles often have dependencies on other roles. By configuring these dependencies in a role, we can make our playbooks more concise.
We have sections within a configuration file that need to be turned on or off easily.
To make our templates more generic and reusable, we want to move hardcoded lists and data structures to variables.
Jinja2 blocks and inheritance provide us with a way to create many similar templates from a common base.
To create generic and reusable roles, we need to allow role users to configure the role behavior using variables.
Some configuration might be specific to the system we’re configuring. Ansible provides system-specific facts to help tailor configuration to a system.
By putting systems into groups in Ansible, we can apply configuration to multiple systems at the same time.
To decide whether or how to run a task, we might need to collect dynamic information from a host we’re controlling. Ansible allows us to register results in variables.
By driving tasks using YAML list and dictionary data structures, we can produce more compact and more configurable roles.
To use Ansible Vault to keep secrets secure, we need to know how to encrypt files. We also need to know how to edit and decrypt files we encrypted.
Running Ansible unattended while using Ansible Vault requires us to store our vault password in a file.
Some secret content, such as a private key file for a web server, is an entire file’s worth of content. We need to know how to store that content securely using Ansible Vault.
Adding new functionality to Ansible involves implementing a custom module in the Python language. We can easily add this custom module to a role.
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.
A quality module has extensive documentation to show users how to use it. This documentation is also used to generate the Ansible website.
Ansible can control not just physical and virtual machines, but also Docker containers. This creates new opportunities to use Ansible roles and playbooks in a containerized environment.
Vagrant is a useful tool for dynamically creating virtual machines for development and test in an integrated environment. Ansible lets us set up Vagrant virtual machines quickly and easily.
Vagrant is a tool for dynamic virtual machines, and when we’re using Ansible to provision Vagrant machines, we want to be able to pass information to Ansible dynamically as well.
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.
About the Author
Alan Hohn is a Software Architect who primarily works with distributed Java. He has had a lot of experience re-architecting embedded systems and in combining embedded and enterprise approaches. Lately he has been doing quite a bit of work with virtualization, DevOps, and cloud technologies. Over the past several years, he has had the opportunity to teach courses on Java. His role and interest also mean that he frequently tries out new libraries and new approaches. His hope is that some of that material will be as useful to others as he has occasionally found it. He is employed by Lockheed Martin Mission Systems and Training and his personal blog is called Variegated.