RedHat EX447 Red Hat Certified Specialist in Advanced Automation: Ansible Best Practices Exam Practice Test

Page: 1 / 14
Total 26 questions
Question 1

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 2

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 3

Using the Simulation Program, perform the following tasks:

1. Use an ansible ad-hoc command, check the connectivity of your servers.

2. Use an ad-hoc ansible command, find the free space of your servers.

3. Use an ad-hoc ansible command, find out the memory usage of your servers.

4. Do an ls -l on the targets /var/log/messages file.

5. Tail the contents of the targets /var/log/messages file.



Answer : A


Question 4

Create a role called sample-apache and store it in /home/bob/ansible/roles. The role should

satisfy the following requirements:

*In the role, install and enable httpd. Also enable the firewall to allow http. Also run the template

*index.html.j2 and make sure this runs Create a template index.html.j2 that displays "Welcome to the server HOSTNAME"

In a play called apache.yml in /home/bob/ansible/ run the sample-apache role.



Answer : A


Question 5

Create a playbook /home/bob/ansible/timesync.yml that runs on hosts in the webservers host group and does the following:

* Uses the timesync RHEL system role.

* Sets the ntp server to 0.uk.pool.ntp.org

* Sets the timezone to UTC



Answer : A


Question 6

Create a file called mysecret.yml on the control host using ansible vault in home/bob/ansible. Set the password to 'notasafepass' and inside the file create a variable called dev_pass with the value of devops. Save the file. Then go back in the file and change dev_pass value to devops123. Then change the vault password of mysecret.yml to verysafepass



Answer : A


Question 7

Create a file in /home/sandy/ansible/ called report.yml. Using this playbook, get a file called report.txt (make it look exactly as below). Copy this file over to all remote hosts at /root/report.txt. Then edit the lines in the file to provide the real information of the hosts. If a disk does not exist then write NONE.



Answer : A


Page:    1 / 14   
Total 26 questions