ansible

Ansible with DellEMC Storage: Part 2 – Understanding Ansible

This blog is the continuation of Ansible with DellEMC storage series. Earlier we discussed about getting started with installation of dependencies for Ansible and DellEMC Ansible module, followed by Ansible installation.

In this blog let’s talk more around Ansible architecture and it’s concepts. So let’ get started.

Similar to any other platform or software Ansible also has it’s own concepts which you should understand. This will help you get better hands-on with Ansible.

Below diagram is the high level depiction of the Ansible concepts.

Ansible Concepts

On high level there are two types of nodes

Managed Nodes (Right side of the diagram) – Managed nodes are the devices or software you’ll manage using Ansible. Note that managed nodes don’t need Ansible installed.

Control/Master Node (Left side of the diagram) – This the machine Ansible is installed. On which you’ll login to run Ansible commands.

Master node as multiple components which work together. Below are the high level details

  1. Inventory – This is the list of managed nodes which Ansible will talk to. Ansible always refers to node details from inventory file for executing any tasks. Inventory file support grouping, nesting, etc. which makes it easier for management and administration
  2. Modules – Each module defines certain Ansible function. You can execute modules using defining multiple tasks as part of playbooks
  3. Ansible Config – Consider this file as database of Ansible environment variables. Variables set in Ansible config supersedes any other setting configured in Ansible. Usually default configurations in this file are enough for many environments but there will be situations where you need to edit this file (/etc/ansible/ansible.cfg).
  4. Playbooks – Consider playbooks as list of many tasks which Ansible will execute in the sequence. Playbooks are written in YAML (.yml) and hence they are very easy to create and manage without the extensive knowledge of the coding.

To simplify the playbook understanding just remember that

  • Playbooks contains Plays
    • Plays contains Tasks
      • Tasks call Modules

Below is the example of Ansible Playbook

sample Ansible playbook

There are more concepts when it comes to Ansible (like Tower, Vault, Variables, etc.) but in my personal experience this is the good starting point.

If you find this information stimulating enough and you want to read further then I would highly recommend that you start from here.

I hope these bite sized blogs are helping you pickup Ansible faster. More to come 🙂

Categories: ansible, DellEMC

Tagged as: , , , ,

3 replies »

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s