Ansible for Configuration Management

By Ihor Banadiga

Elevator Pitch

Ansible is an open source automation platform. Ansible can help you with CM application deployment, tasks in sequence automation and create a chain of events. It’s simple yet powerful CM system.

At the end of this workshop, you will have enough knowledge to start working effectively with Ansible.

Description

This is the Ansible “from zero to hero” workshop. It consists of 2 parts, 2 hours each. There are also 9 demos during the whole workshop.

The workshop will cover the following topics:

  • General Ansible overview (classification, architecture, terminology)
  • Ansible programming fundamentals (variables, conditions, loops, and blocks in the playbook)
  • Extending Ansible functionality with modules, plugins, roles
  • Advanced Ansible features - configuration, strategies, batch execution, asynchronous execution, pre/post tasks, tags, testing etc.
  • Security in Ansible

As a side effect, we will also touch the following topics:

  • YAML advanced features
  • Infrastructure as a code and Ansible tower as a tool to increase your productivity.

Before visiting the workshop do not forget to install and prepare a demo environment. Go step by step through README.md on the GitHub

At the end of this workshop, you will have enough knowledge to start working effectively with Ansible.

Notes

Ansible for Configuration Management Part1.

In the introductory part, we will bring the notion of CM (Configuration Management), introduce the basic concepts and terminology in Ansible and best practice for writing Ansible scripts.

Agenda:

  • Configuration management few words about CM architecture, responsibility, and feature.
  • Ansible introduction.
  • Terminology
  • Programming knowledge variables, conditions, loops, blocks in the playbook.

See slides: Ansible for Configuration Management Part1.

Ansible for Configuration Management Part2.

The second part is devoted to the deep immersion in the capabilities of Ansible features - configuration, strategies, batch execution, variable scope, async tasks, pre/post tasks, tags, testing etc. Of course one of the sections will be dedicated to security in Ansible.

Agenda:

  • YAML starting the second part from the feature of YAML format.
  • Extend functionality overview method of extension functionality(module, plugins, roles)
  • Advanced knowledge feature of ansible: configuration, strategy, serial, asynchronous execution, pre/post tasks, tags, testing.
  • Security in Ansible. Show how we can hide secrets at the playbook.
  • Use cases overview most common use cases and my experience using Ansible.

See slides: Ansible for Configuration Management Part2

Ansible for Configuration Management Demos

The demo covers all basic topics to ensure the best knowledge adoption.

List of demos:

  • Intro demo Ansible setup and command line.
  • Set up ssh connection a kind of “Hello world” playbook.
  • Programming variables, conditions, loops, blocks in the playbook.
  • YAML advanced feature of the yaml format which can help with writing Ansible playbooks.
  • Roles as a way to share your plays with other.
  • Advanced features of Ansible: configuration, strategies, batch execution, asynchronous execution, pre/post tasks, tags.
  • Infrastructure as a code can be provided by ansible (vagrant and terraform).
  • Ansible tower as a tool for increase your productivity.
  • Security in Ansible.

See demo on GitHub: Ansible for Configuration Management Demo

I would love to take part in your event and to share my Ansible experience.