RHCE | Exam Revision Questions and
Answers | All Correct
What is Ansible? - Answer✔️✔️-Open source automation platform
providing language that allows to describe in a declarative fashion a
desired state of IT application infrastructure.
Ansible Playbooks are written in... - Answer✔️✔️-YAML
Ansible traits - Answer✔️✔️-1. Agentless - target systems do not need any
agent software. Ansible most often connects to target systems via
SSH/WinRM and injects small programs called "ansible modules" that put
the system in the desired state, described in the playbook.
2. Cross-platform
3. Human-readable
Ansible Node Types - Answer✔️✔️-1. Control node - Ansible is installed
there and it stores playbooks, inventories etc.
2. Managed hosts - Those are listed in inventories. Hosts which control
node connects and makes changes to put them in the desired state, defined
by a playbook.
1
,©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM
What does it mean that Ansible is indempotent? - Answer✔️✔️-You can
safely run a playbook on the same hosts multiple times. When your
systems are in the correct state, the playbook makes no changes when you
run it. Not every module adheres to that out of the box.
How to register new RHEL for subscription? - Answer✔️✔️-Usually two
commands are used to do that:
1. subscription-manager register --username=youruser --
password=yourpwd
2. subscription-manager --attach --pool=poolID
Where pools and their IDs can be viewed by:
subscription-manager list --available
How to enable a new RHEL software repository with CMDs? - Answer✔️✔️-
To add repo:
subscription-manager repos --enable "repo_name"
To list repo:
2
, ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM
subscription-manager repos --list
What are the requirements for using Ansible on RHEL8? - Answer✔️✔️-1.
Python (at least 3.5 or 2.7) - can be "platform-python" pkg
2. "ansible-core" package installed on control node
3. Python in the same minimal version should be present on managed
nodes (if SELinux is present, install "python3-libselinux" too)
To check:
- ansible --version
- ansible -m setup localhost | grep python_version
What is Ansible Inventory? And what types are there. - Answer✔️✔️-
Collection of hosts that Ansible will manage. Those hosts can be assigned
to groups that are collectively managed. Those groups can have child
groups and hosts can be in multiple groups.
Default Ansible inventory resides in /etc/ansible/hosts
Inventory can be:
1. Static - defined in a INI or YAML text file
3