100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

RHCE | Exam Revision Questions and Answers | All Correct

Rating
-
Sold
-
Pages
30
Grade
A+
Uploaded on
28-08-2024
Written in
2024/2025

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. ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM 2 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: ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM 3 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 ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM 4 2. Dynamic - generated by a script or program as needed Groups in Ansible Inventory - Answer️️ -Inventory always has 2 default groups: 1. all - every host mentioned in the inventory 2. ungrouped - every host mentioned in the inventory that is not a member of any other group Normal groups are defined as: [groupname] host1 host2 192.168.0.34 Nested groups are defined as: [biggergroupname:children] groupname Ranges of IP addresses as well as numbers in hostnames are also allowed: [START:END] ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM 5 ansible -i groupname --list-hosts - verifies inventory file by listing hosts from a group Ansible configuration files (with precendence) - Answer️️ -From lowest to highest precedence: 1. /etc/ansible/ - default, provided with installation 2. ~/. 3. ./ - directory from which ansible command is executed (most recommended, best practice) 4. ANSIBLE_CONFIG environment variable Ansible looks for those file from 4th to 1st, and uses only configuration from the one it found first. How to generate a sample Ansible config - Answer️️ -ansible-config init -- disabled > Ansible core configuration settings - Answer️️ -[defaults] - default settings for Ansible operation 1. inventory - path to default inventory location 2. remote_user - user to which Ansible should log in on managed hosts 3. ask_pass - if passwordless SSH is not to be preffered ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM 6 [privilege_escalation] - configures how Ansible performs privilege escalation on managed hosts 1. become - whether or not to switch a user on managed hosts to root 2. become_method - typically "sudo", can be also "su" 3. become_user - typically and by default root 4. become_ask_pass - whether to prompt for a password when becoming a root Ansible Ad Hoc Command - Answer️️ -A way of executing a single Ansible task quickly, one that you do not need to save to run again later. They are simple, online operations that can be run without writing a playbook. ansible host-pattern -m module [-a 'module arguments'] [-i inventory] How to find Ansible module documentation in command line env? - Answer️️ -Use ansible-doc command: 1. ansible-doc -l - lists all modules 2. ansible-doc <modulename> - show manual about the specific module 3. ansible-doc -s <modulename> - generate a starter template to see how to use a module Most often used Ansible file modules - Answer️️ -1. copy ©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM 7 2. file 3. lineinfile 4. synchronize Most often used Ansible software package modules - Answer️️ -1. package - universal for most pkg managers 2. yum 3. apt 4. dnf 5. gem 6. pim Most often used Ansible system modules - Answer️️ -1. firewalld 2. reboot 3. service 4. user Most often user Ansible Net-Tools modules - Answer️️ -1. get

Show more Read less
Institution
RHCE
Course
RHCE










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
RHCE
Course
RHCE

Document information

Uploaded on
August 28, 2024
Number of pages
30
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

©SOPHIABENNET@2024/2025 Tuesday, August 20, 2024 10:21 AM


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

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
SophiaBennett Howard Community College
View profile
Follow You need to be logged in order to follow users or courses
Sold
130
Member since
1 year
Number of followers
5
Documents
8567
Last sold
2 weeks ago
EXAM GAME-CHANGER

Exam Questions and Answers Section : Study Like a Pro, Study Smart, Study with Sophia.

3.7

26 reviews

5
10
4
5
3
7
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions