Chapter 6. Orchestrating with Ansible

In this chapter, the following recipes will be addressed:

  • Installing Ansible
  • Configuring the Ansible inventory
  • Creating the template for a kickstart file
  • Creating a playbook to deploy a new VM with kickstart
  • Creating a playbook to perform system configuration tasks
  • Troubleshooting Ansible

Introduction

Ansible is an easy-to-use agentless system configuration management tool. It allows us to deploy complex configurations without the hassle of a complex interface or language.

Ansible uses playbooks, which are collections of tasks to deploy configurations and applications to multiple nodes over SSH in a controlled way. However, it doesn't stop there.

Ansible's modules, which are used to execute tasks, are all built to be idempotent in their execution.

The definition of Idempotence, according to Wikipedia, is as follows:

Idempotence (/?a?d?m'po?t?ns/ eye-d?m-poh-t?ns [citation needed]) is the property of certain operations in mathematics and computer science that can be applied multiple times without changing the result beyond the initial application.

In short, any module will detect the changes to be applied and perform them. If it doesn't need to change anything, it will not reapply the requested changes or interfere with file metadata.

The Ansible company also provides Tower, a paid subscription with extra features, as an add-on to Ansible. Tower provides a graphical interface to control your Ansible orchestration tool. However, this is out of the scope of this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset