RedHat EX294 Red Hat Certified Engineer (RHCE) exam for Red Hat Enterprise Linux 8 Exam Practice Test

Page: 1 / 14
Total 35 questions
Question 1

Create Logical volumes with lvm.yml in all nodes according to following

requirements.

----------------------------------------------------------------------------------------

* Create a new Logical volume named as 'data'

* LV should be the member of 'research' Volume Group

* LV size should be 1500M

* It should be formatted with ext4 file-system.

--> If Volume Group does not exist then it should print the message "VG Not found"

--> If the VG can not accommodate 1500M size then it should print "LV Can not be

created with

following size", then the LV should be created with 800M of size.

--> Do not perform any mounting for this LV.



Answer : A


Question 2

Create user accounts

------------------------

--> A list of users to be created can be found in the file called user_list.yml

which you should download from http://classroom.example.com/user_list.yml and

save to /home/admin/ansible/

--> Using the password vault created elsewhere in this exam, create a playbook called

create_user.yml

that creates user accounts as follows:

--> Users with a job description of developer should be:

--> created on managed nodes in the "dev" and "test" host groups assigned the

password from the "dev_pass"

variable and these user should be member of supplementary group "devops".

--> Users with a job description of manager should be:

--> created on managed nodes in the "prod" host group assigned the password from

the "mgr_pass" variable

and these user should be member of supplementary group "opsmgr"

--> Passwords should use the "SHA512" hash format. Your playbook should work using

the vault password file

created elsewhere in this exam.

while practising you to create these file hear. But in exam have to download as per

questation.

user_list.yml file consist:

---

user:

- name: user1

job: developer

- name: user2

job: manager



Answer : A


Question 3

Rekey an existing Ansible vault as follows:

-----------------------------------------------

* Download Ansible vault from http:// classroom.example.com /secret.yml to /home/

admin/ansible/

* The current vault password is curabete

* The new vault password is newvare

* The vault remains in an encrypted state with the new password



Answer : A


Question 4

Modify file content.

------------------------

Create a playbook called /home/admin/ansible/modify.yml as follows:

* The playbook runs on all inventory hosts

* The playbook replaces the contents of /etc/issue with a single line of text as

follows:

--> On hosts in the dev host group, the line reads: ''Development''

--> On hosts in the test host group, the line reads: ''Test''

--> On hosts in the prod host group, the line reads: ''Production''



Answer : A


Question 5

Create a playbook called hwreport.yml that produces an output file called /root/

hwreport.txt on all managed nodes with the following information:

------------------------------------------------------------------------------------------------------

--> Inventory host name

--> Total memory in MB

--> BIOS version

--> Size of disk device vda

--> Size of disk device vdb

Each line of the output file contains a single key-value pair.

* Your playbook should:

--> Download the file hwreport.empty from the URL http://classroom.example.com/

hwreport.empty and

save it as /root/hwreport.txt

--> Modify with the correct values.

note: If a hardware item does not exist, the associated value should be set to NONE

----------------------------------------------------------------------------------------------

while practising you to create these file hear. But in exam have to download as per

questation.

hwreport.txt file consists.

my_sys=hostname

my_BIOS=biosversion

my_MEMORY=memory

my_vda=vdasize

my_vdb=vdbsize



Answer : A


Question 6

Generate a hosts file:

* Download an initial template file hosts.j2 from http://classroom.example.com/

hosts.j2 to

/home/admin/ansible/ Complete the template so that it can be used to generate a file

with a

line for each inventory host in the same format as /etc/hosts:

172.25.250.9 workstation.lab.example.com workstation

* Create a playbook called gen_hosts.yml that uses this template to generate the file

/etc/myhosts on hosts in the dev host group.

* When completed, the file /etc/myhosts on hosts in the dev host group should have a

line for

each managed host:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

172.25.250.10 serevra.lab.example.com servera

172.25.250.11 serevrb.lab.example.com serverb

172.25.250.12 serevrc.lab.example.com serverc

172.25.250.13 serevrd.lab.example.com serverd

-----------------------------------------------------------------

while practising you to create these file hear. But in exam have to download as per

questation.

hosts.j2 file consists.

localhost localhost.localdomain localhost4 localhost4.localdomain4

::1

localhost localhost.localdomain localhost6 localhost6.localdomain6

-------------------------------------------------------------------



Answer : A


Question 7

Create an Ansible vault to store user passwords as follows:

* The name of the vault is valut.yml

* The vault contains two variables as follows:

- dev_pass with value wakennym

- mgr_pass with value rocky

* The password to encrypt and decrypt the vault is atenorth

* The password is stored in the file /home/admin/ansible/password.txt



Answer : A


Page:    1 / 14   
Total 35 questions