Testking offers free demo for EX294 exam. "Red Hat Certified Engineer (RHCE) exam", also known as EX294 exam, is a Red-Hat Certification. This set of posts, Passing the Red-Hat EX294 exam, will help you answer those questions. The EX294 Questions & Answers covers all the knowledge points of the real exam. 100% real Red-Hat EX294 exams and revised by experts!
Red-Hat EX294 Free Dumps Questions Online, Read and Test Now.
NEW QUESTION 1
Install and configure ansible
User sandy has been created on your control node with the appropriate permissions already, do not change or modify ssh keys. Install the necessary packages to run ansible on the control node. Configure ansible.cfg to be in folder /home/sandy/ansible/ansible.cfg and configure to access remote machines via the sandy user. All roles should be in the path /home/sandy/ansible/roles. The inventory path should be in
/home/sandy/ansible/invenlory.
Configure these nodes to be in an inventory file where node I is a member of group dev. nodc2 is a member of group test, node3 is a member of group proxy, nodc4 and node 5 are members of group prod. Also, prod is a member of group webservers.
Solution:
In/home/sandy/ansible/ansible.cfg
[defaults] inventory=/home/sandy/ansible/inventory roles_path=/home/sandy/ansible/roles remote_user= sandy host_key_checking=false [privilegeescalation]
become=true become_user=root become_method=sudo become_ask_pass=false
In /home/sandy/ansible/inventory
[dev]
node 1 .example.com [test]
[proxy]
node3 .example.com [prod] node4.example.com node5 .example.com [webservers:children] prod
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 2
Create a Shell script /root/program:
The shell script will come back to ”user” parameter when you are entering ”kernel” parameter.
The shell script will come back to ”kernel” when you are entering ”user” parameter.
It will output the standard error when this script ”usage:/root/program kernel|user” don’t input any parameter or the parameter you inputted is entered as the requirements.
Solution:

Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 3
Install and configure Ansible on the control-node control.realmX.example.com as follows:
------------------------------------------------------------------------------------------
--> Install the required packages
--> Create a static inventory file called /home/admin/ansible/inventory as follows: node1.realmX.example.com is a member of the dev host group node2.realmX.example.com is a member of the test host group node3.realmX.example.com & node4.realmX.example.com are members of the prod host group
node5.realmX.example.com is a member of the balancers host group. prod group is a member of the webservers host group
--> Create a configuration file called ansible.cfg as follows:
--> The host inventory file /home/admin/ansible/inventory is defined
--> The location of roles used in playbooks is defined as /home/admin/ansible/ roles
Solution:
Solution as:
Through physical host, login to workstation.lab.example.com with user root.
# ssh root@workstation.lab.example.com
# hostname workstation.lab.example.com
# yum install platform-python*
# su - admin
# pwd
/home/admin/
# vim .vimrc
# mkdir -p ansible/roles
# cd ansible
# vim inventory [dev]
servera.lab.example.com [test] serverb.example.com [prod] serverc.example.com serverd.example.com [balancer] serverd.lab.example.com [webservers:children] prod
!wq
# vim ansible.cfg [defaults]
inventory = ./inventory
role_path = ./roles remote_user = admin ask_pass = false [privilege_escalation] become = true become_method = sudo become_user = root become_ask_pass = false
!wq
# ansible all -–list-hosts
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 4
Create an ansible vault password file called lock.yml with the password reallysafepw in the
/home/sandy/ansible directory. In the lock.yml file define two variables. One is pw_dev and the password is 'dev' and the other is pw_mgr and the password is 'mgr' Create a regular file called secret.txt which contains the password for lock.yml.
Solution:
ansible-vault create lock.yml
New Vault Password: reallysafepw Confirm: reallysafepw
In File:

Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 5
Create a playbook called packages.yml that:
---------------------------------------------
--> Installs the php and mariadb packages on hosts in the dev, test, and prod host groups.
--> Installs the Development Tools package group on hosts in the dev host group.
--> Updates all packages to the latest version on hosts in the dev host group.
Solution:
Solution as:
# pwd home/admin/ansible/
# vim packages.yml
--
- name: Install the packages hosts: dev,test,prod
vars:
- php_pkg: php
- mariadb_pkg: mariadb tasks:
- name: install the packages yum:
name:
- "{{ php_pkg }}"
- "{{ mariadb_pkg }}"
state: latest
- name: install the devops tool packages hosts: dev
tasks:
- name: install devepment tools yum:
name: "@Development Tools" state: latest
- name: upgrade all the packages yum:
name: "*" state: latest
exclude: kernel*
!wq
# ansible-playbook package.yml –-syntax-check
# ansible-playbook package.yml
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 6
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
Solution:
Solution as:
# pwd
/home/admin/ansible/
#
wget http://classroom.example.com/secret.yml
# chmod 0600 newpassword.txt
# ansible-vault rekey vault.yml --new-vault-password-file=newpassword.txt
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 7
Install and configure ansible
User bob has been created on your control node. Give him the appropriate permissions on the control node. Install the necessary packages to run ansible on the control node.
Create a configuration file /home/bob/ansible/ansible.cfg to meet the following requirements:
• The roles path should include /home/bob/ansible/roles, as well as any other path that may be required for the course of the sample exam.
• The inventory file path is /home/bob/ansible/inventory.
• Ansible should be able to manage 10 hosts at a single time.
• Ansible should connect to all managed nodes using the bob user. Create an inventory file for the following five nodes: nodel.example.com
node2.example.com node3.example.com node4.example.com node5.example.com
Configure these nodes to be in an inventory file where node1 is a member of group dev. nodc2 is a member of group test, nodc3 is a member of group proxy, nodc4 and node 5 are members of group prod. Also, prod is a member of group webservers.
Solution:
In/home/sandy/ansible/ansible.cfg
[defaults]
inventory=/home/sandy/ansible/inventory
roles_path=/home/sandy/ansible/roles
remote_user= sandy
host_key_checking=false
[privilegeescalation]
become=true
become_user=root
become_method=sudo
become_ask_pass=false
In /home/sandy/ansible/inventory
[dev]
node 1.example.com
[test]
node2.example.com
[proxy]
node3 .example.com
[prod]
node4.example.com
node5 .example.com
[webservers:children]
prod
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 8
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'
Solution:
Solution as:

Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 9
Create an empty encrypted file called myvault.yml in /home/sandy/ansible and set the password to
notsafepw. Rekey the password to iwejfj2221. See the
Solution:
ansible-vault create myvault.yml
Create new password: notsafepw Confirm password: notsafepw ansible-vault rekey myvault.yml
Current password: notsafepw New password: iwejfj2221 Confirm password: iwejfj2221
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 10
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
Solution:
Solution as:
# pwd
/home/admin/ansible
# echo "atenorth" >password.txt
# chmod 0600 password.txt
# ansible-vault create vault.yml --vault-password-file=password.txt
--
- dev_pass: wakennym
- mgr_pass: rocky wq
# cat vault.yml
$ANSIBLE_VAULT;1.1;AES256 36383862376164316436353665343765643331393433373564613762666531313034336438353662
3464346331346461306337633632393563643531376139610a343531326130663266613533633562
38623439316631306463623761343939373263333134353264333834353264343934373765643737
3535303630626666370a643663366634383863393338616661666632353139306436316430616334
65386134393363643133363738656130636532346431376265613066326162643437643064313863
6633333537303334333437646163343666666132316639376531
# ansible-vault view vault.yml password:******
--
- dev_pass: wakennym
- mgr_pass: rocky
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 11
Create and run an Ansible ad-hoc command.
--> As a system administrator, you will need to install software on the managed nodes.
--> Create a shell script called yum-pack.sh that runs an Ansible ad-hoc command to create yum-repository on each of the managed nodes as follows:
--> repository1
----------
* 1. The name of the repository is EX407
* 2. The description is "Ex407 Description"
* 3. The base URL is http://content.example.com/rhel8.0/x86_64/dvd/BaseOS/
* 4. GPG signature checking is enabled
* 5. The GPG key URL is http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEYredhat- release
* 6. The repository is enabled
--> repository2
----------
* 1. The name of the repository is EXX407
* 2. The description is "Exx407 Description"
* 3. The base URL is http://content.example.com/rhel8.0/x86_64/dvd/AppStream/
* 4. GPG signature checking is enabled
* 5. The GPG key URL is http://content.example.com/rhel8.0/x86_64/dvd/ RPM-GPG-KEYredhat- release
* 6. The repository is enabled
Solution:
Solution as:
# pwd
/home/admin/ansible
# vim yum-pack.sh
#!/bin/bash
ansible all -m yum_repository -a 'name=EX407 description="Ex407 Description"
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/BaseOS/
gpgcheck=yes
gpgkey=http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
enabled=yes'
ansible all -m yum_repository -a 'name=EXX407 description="Exx407 Description"
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/AppStream/
gpgcheck=yes
gpgkey=http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
enabled=yes'
!wq
# chmod +x yum-pack.sh
# bash yum-pack.sh
# ansible all -m command -a 'yum repolist all'
Does this meet the goal?
- A. Yes
- B. Not Mastered
Answer: A
NEW QUESTION 12
......
Thanks for reading the newest EX294 exam dumps! We recommend you to try the PREMIUM Dumps-files.com EX294 dumps in VCE and PDF here: https://www.dumps-files.com/files/EX294/ (35 Q&As Dumps)