RedHat EX407 Red Hat Certified Specialist in Ansible Automation Exam Practice Test

Page: 1 / 14
Total 41 questions
Question 1

===================================================================================

control.realmX.example.com _ workstation.lab.example.com

node1.realmX.example.com _ servera.lab.example.com

node2.realmX.example.com _ serverb.lab.example.com

node3.realmX.example.com _ serverc.lab.example.com

node4.realmX.example.com _ serverd.lab.example.com

node5.realmX.example.com

- username:root, password:redhat

- username:admin, password:redhat

note1. don't change 'root' or 'admin' password.

note2. no need to create ssh-keygen for access, its pre-defined

note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.

===================================================================================

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.



Answer : A


Question 2

===================================================================================

control.realmX.example.com _ workstation.lab.example.com

node1.realmX.example.com _ servera.lab.example.com

node2.realmX.example.com _ serverb.lab.example.com

node3.realmX.example.com _ serverc.lab.example.com

node4.realmX.example.com _ serverd.lab.example.com

node5.realmX.example.com

- username:root, password:redhat

- username:admin, password:redhat

note1. don't change 'root' or 'admin' password.

note2. no need to create ssh-keygen for access, its pre-defined

note3. SELinux is in enforcing mode and firewalld is disabled/stop on whole managed hosts.

===================================================================================

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



Answer : A


Question 3

Using the Simulation Program, perform the following tasks:

Static Inventories Task:

1. Add a new group to your default ansible host file. call the group [ec2]

2. Add a new host to the new group you created.

3. Add a variable to a new host entry in the /etc/ansible/hosts file. Add the following. localhost http_port=80 maxRequestsPerChild=808

4. Check to see if maxRequestsPerChild is pulled out with an ad-hoc command.

5. Create a local host file and put a target group and then a host into it. Then ping it with an ad-hoc command.



Answer : A


Question 4

Using the Simulation Program, perform the following tasks:

Ad-Hoc Ansible Commands (Number Two) Task:

1. Use the ad-hoc command to make sure php is installed.

2. Use the ad-hoc command to make sure that php is installed and is the latest version.

3. Use the ad-hoc command to make sure that httpd is installed.

4. Use the ad-hoc command to remove httpd from the servers.



Answer : A


Question 5

Create a playbook /home/bob /ansible/motd.yml that runs on all inventory hosts and docs the following: The playbook should replaee any existing content of/etc/motd in the following text. Use ansible facts to display the FQDN of each host

On hosts in the dev host group the line should be "Welcome to Dev Server FQDN".

On hosts in the webserver host group the line should be "Welcome to Apache Server FQDN".

On hosts in the database host group the line should be "Welcome to MySQL Server FQDN".



Answer : A


Question 6

Create a playbook that changes the default target on all nodes to multi-user tarqet. Do this in playbook file called target.yml in /home/sandy/ansible



Answer : A


Question 7

Create an empty encrypted file called myvault.yml in /home/sandy/ansible and set the password to notsafepw. Rekey the password to iwejfj2221.



Answer : A


Page:    1 / 14   
Total 41 questions