Ansible FACTS and Custom FACTS
FACTS are variables related to remote systems. Ansible has the capability to discover and retrieve certain values from a remote node and store then in variables. This includes capturing the number of CPUs in the…
FACTS are variables related to remote systems. Ansible has the capability to discover and retrieve certain values from a remote node and store then in variables. This includes capturing the number of CPUs in the…
Ansible vault is a tool that helps to encrypt, decrypt and manage sensitive data such as passwords, playbooks, files, etc. If a playbook is encrypted, ansible-navigator will prompt for the password if ones tries to…
In the below example variables are defined in the host inventory file. [root@centos9vm ~]# cat inventory === === === 192.168.132.129 192.168.132.130 servera.example.com [webservers] servera.example.com serverb.example.com [dbservers] serverc.example.com serverb.example.com servera.example.com [myGroups:children] webservers dbservers [testGRP] 192.168.132.130 [testGRP:vars]…
Variables hold values that can be used when playbooks are executed. It can be defined in: Inventory file (host scope) Playbook (play scope) Defined globally (global scope) Play scope In the below example variables are…
In this example we will write a simple playbook in Ansible, that will create a new user in a managed host. For this we need to ensure the managed host is present in the “inventory”…
A simple Ansible inventory file is a txt file that has a list of managed hosts and groups. A simple Inventory can be as follows: [root@centos9vm ~]# cat inventory == ===== 192.168.132.129 servera.example.com [webservers] servera.example.com…
The ansible-navigator is a command-line tool which is used for creating, reviewing, running and troubleshooting Ansible content, including playbooks, collections, inventories, documentation and container images. It comes with RHEL distributions and can be installed using…
The sudo command allows you to run programs with the security privileges of another user. Usually this command is used to run command as a superuser. The configuration files are : /etc/sudoers /etc/sudoers.d/* Instead of…
Every file or folder created in a Linux system is associated with an iNode. The name given to the file is mapped to the inode created. Hard Link The below command creates two hard links to…
The SoS report command is a tool that collects various details from a Redhat Linux server. These details include configuration details, system information and diagnostic information such as the running kernel version, loaded modules, and…