-
Checking playbook syntax – Infrastructure as Code (IaC) with Terraform
It is a best practice to check playbook syntax before applying it to your inventory. To check your playbook’s syntax, run the following command:$ ansible-playbook ping.yaml –syntax-checkplaybook: ping.yaml The syntax…
-
Introduction to Ansible playbooks – Infrastructure as Code (IaC) with Terraform
Imagine you’re a conductor leading an orchestra. In this scenario, Ansible playbooks are akin to your musical score, guiding every musician to create a harmonious symphony of automation in the…
-
Ansible tasks and modules – Infrastructure as Code (IaC) with Terraform
Ansible tasks form the basic building block of running Ansible commands. Ansible tasks are structured in the following format: $ ansible <options> <inventory> Ansible modules are reusable code for a…
-
Setting up the Ansible configuration file – Infrastructure as Code (IaC) with Terraform
The Ansible configuration file defines global properties that are specific to our setup. The following are ways in which you can specify the Ansible configuration file, and the first method…
-
Installing Ansible in the control node – Infrastructure as Code (IaC) with Terraform
Ansible requires a Linux/Unix machine (preferably), and you should have Python 2.x or 3.x installed. As the Ansible control node runs on Ubuntu, Ansible provides a personal package archive (PPA)…
-
Connecting the Ansible control node with inventory servers – Infrastructure as Code (IaC) with Terraform
We’ve already set up passwordless SSH between the control node and managed nodes when we provisioned the infrastructure using Terraform. Let’s look at how we did that to understand it…
-
Setting up Ansible – Infrastructure as Code (IaC) with Terraform
We need to set up and install Ansible in the control node, but before we do that, we will have to spin three servers to start the activity—an Ansible control…
-
Introduction to configuration management – Infrastructure as Code (IaC) with Terraform-
Let’s delve into the reasons why using Ansible is a great choice for CM and automation. Here are some compelling factors: These advantages establish Ansible as a popular choice for…
-
Introduction to configuration management – Infrastructure as Code (IaC) with Terraform-1
CM, in the realm of technology and systems administration, can be compared to the role of a conductor leading an orchestra. Imagine yourself guiding a group of musicians, each playing…
-
terraform console – Infrastructure as Code (IaC) with Terraform
The terraform console command provides an interactive console to investigate state files, dynamically build paths, and evaluate expressions even before using them in resources. It is a potent tool that…