Ansible: Nine (9) Part Series for Familiarization

Do you want to learn about Ansible? Well, you've found the best place to start! This nine (9) part series will familiarize you with Ansible.

Article 1 creates a base environment for using Ansible in future articles in the series. It leverages AWS Cloud9, several AWS CLI for "aws ec2" for describing instances and provisioning SSH keys. The article ends with making sure your Cloud9 environment is up-to-date with Python, Pip, and Ansible.

Ansible 1 of 9: Environment Setup

Article 2 introduces you to the Ansible inventory and the Ansible ping module, pointing out how the Ansible ping module does more than just ping a host, it attempts to connect to the host also. You will also get introduced to the Ansible config file.

Ansible 2 of 9: Inventory/Ad-Hoc Configuration

Article 3 is all about Ansible modules. You will use several modules:
ping module to check if targets are up
command module to run commands against target hosts
apt module to install software on targets
shell module to run commands in a shell on targets
service module to interact with services on targets
copy module to copy files to targets
file module to manipulate files on target (e.g.: delete)

Ansible 3 of 9: Modules

Article 4 is more of a setup for the next article. It provisions the infrastructure via Terraform and validates connectivity to targets via Ansible ping. Suffice to say, playbooks are repeatable recipes that can be run against your infrastructure.

Ansible 4 of 9: Playbooks 1 of 2

Article 5 is about using an Ansible Plabyook. You will dp several things:
manually install nginx test the application uninstall nginx install nginx using the Ansible playbook At the end of this article, you will destroy the infrastructure you created in Article 4.

Ansible 5 of 9: Playbooks 2 of 2

Article 6 is about Ansible Variables. Use variables to store and reference values that can be used throughout playbooks, templates, and other Ansible configuration files. Variables can be used against a single host or a group of hosts.

Ansible 6 of 9: Variables

Article 7 is about Ansible Conditionals. You can use conditionals to control the execution of playbooks based on specific conditions or values. For example, you can do certain steps depending upon the target operating system

Ansible 7 of 9: Conditionals

Article 8 is about Ansible Loops. The looping techniques used are "with_items" and the "loop" directive.

Ansible 8 of 9: Loops

Article 9 is about Ansible Roles. Roles permit you to do a series of operations against infrastructure, simply due to classification into certain "roles". You can load variables, files, tasks, handlers, etc., all based on a known file structure.

Ansible 9 of 9: Roles

Comments

Popular posts from this blog

Containing the Chaos! | A Three-Part Series Demonstrating the Usefulness of Containerization to HumanGov

Ansible is the Answer! | A Three-Part Series Demonstrating the Usefulness of Ansible to HumanGov