Registering variables
-
Immutable infrastructure with HashiCorp’s Packer – Immutable Infrastructure with Packer-2
With the scalable infrastructure that the cloud provides, you can have a dynamic horizontal scaling model where VMs scale with traffic. Therefore, you can have the best possible utilization of…
-
Immutable infrastructure with HashiCorp’s Packer – Immutable Infrastructure with Packer-1
Imagine you are the author of a book and you need to make changes to an existing edition. When you want to make changes, such as improving the content or…
-
Registering variables – Infrastructure as Code (IaC) with Terraform-3
The common directory contains a single directory called tasks that includes a main.yaml file with a single task to run an apt update operation. The main directory contains ansible.cfg, hosts,…
-
Registering variables – Infrastructure as Code (IaC) with Terraform-2
Tip While choosing between the vars and defaults directories, the rule of thumb is to put variables that will not change within the vars directory. Put variables that are likely…
-
Registering variables – Infrastructure as Code (IaC) with Terraform
If a task within your playbook, for example, needs a value from the result of a preceding task, we can use the register attribute. The following directory contains all the…
-
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…
-
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…