Exam4Training

RedHat EX294 Red Hat Certified Engineer (RHCE) exam for Red Hat Enterprise Linux 8 Online Training

Question #1

CORRECT TEXT

Create a file called packages.yml in/home/sandy/ansibleto install some packages for the following hosts. On dev, prod and webservers install packages httpd, mod_ssl, and mariadb. On dev only install the development tools package. Also, on dev host update all the packages to the latest.

Reveal Solution Hide Solution

Correct Answer: Solution as:

** NOTE 1 a more acceptable answer is likely ‘present’ since it’s not asking to install the latest

state: present

** NOTE 2 need to update the development node

-name: update all packages on development node

yum: name: ‘*’ state: latest


Question #2

CORRECT TEXT

Create an empty encrypted file calledmyvault.yml in /home/sandy/ansibleand set the passwordtonotsafepw. Rekey the passwordtoiwejfj2221.

Reveal Solution Hide Solution

Correct Answer: ansible-vault create myvault.yml Create new password: notsafepw Confirm password: notsafepwansible-vault rekeymyvault.yml

Current password: notsafepw New password: iwejfj2221 Confirm password: iwejfj2221

Question #3

CORRECT TEXT

In /home/sandy/ansible/create a playbook calledlogvol.yml. Inthe play create a logical volume calledIv0and make it of size 1500MiB on volume groupvgOIf there is not enough space in the volume groupprinta message"Not enough space for logical volume"and then make a 800MiBIv0instead. If the volume group still doesn’t exist, create a message "Volume group doesn’t exist"Create anxfsfilesystem on allIv0logical volumes. Don’t mount the logical volume.

Reveal Solution Hide Solution

Correct Answer: Solution as:



Question #4

CORRECT TEXT

Create a playbook called regulartasks.yml which has the system that append the date to /root/datefile every day at noon. Name is job ‘datejob’

Reveal Solution Hide Solution

Correct Answer:  

Solution as:



Question #5

CORRECT TEXT

Create anansible vault password file calledlock.ymlwith the passwordreallysafepwin the /home/sandy/ansibledirectory. In the lock.yml file define two variables. One ispw_devand the password is ‘dev’ and the other ispw_mgrand the password is ‘mgr’ Create a regular file calledsecret.txtwhich contains the password for lock.yml.

Reveal Solution Hide Solution

Correct Answer: ansible-vault create lock.yml New Vault Password: reallysafepw Confirm: reallysafepw



Exit mobile version