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.
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
- 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
- Modules – Each module defines certain Ansible function. You can execute modules using defining multiple tasks as part of playbooks
- 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 (
- 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
- Plays contains Tasks
Below is the example of 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 🙂
- Part 1 – Installing Ansible
- Part 2 – Understanding Ansible
- Part 3 – Installing DellEMC PowerMax Ansible Module
- Part 4 – DellEMC PowerMax Ansible Modules
3 replies »