EX447 Dumps

EX447 Free Practice Test

Red-Hat EX447: Red Hat Certified Specialist in Advanced Automation: Ansible Best Practices

QUESTION 1

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
Solution:
ansible-vault create lock.yml
New Vault Password: reallysafepw Confirm: reallysafepw
EX447 dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 2

Create the users in the file usersjist.yml file provided. Do this in a playbook called users.yml located at
/home/sandy/ansible. The passwords for these users should be set using the lock.yml file from TASK7. When running the playbook, the lock.yml file should be unlocked with secret.txt file from TASK 7.
All users with the job of 'developer' should be created on the dev hosts, add them to the group devops, their password should be set using the pw_dev variable. Likewise create users with the job of 'manager' on the proxy host and add the users to the group 'managers', their password should be set using the pw_mgr variable.
EX447 dumps exhibit
Solution:
ansible-playbook users.yml –vault-password-file=secret.txt
EX447 dumps exhibit

Does this meet the goal?

Correct Answer: A

QUESTION 3

Create a file called requirements.yml in /home/sandy/ansible/roles to install two roles. The source for the first role is geerlingguy.haproxy and geerlingguy.php. Name the first haproxy-role and the second php-role. The roles should be installed in /home/sandy/ansible/roles.
Solution:
in /home/sandy/ansible/roles vim requirements.yml
EX447 dumps exhibit
Run the requirements file from the roles directory:
ansible-galaxy install -r requirements.yml -p /home/sandy/ansible/roles

Does this meet the goal?

Correct Answer: A

QUESTION 4

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.
Solution:
* 1. ansible all -m ping
* 2. ansible all -a "/bin/df -h"
* 3. ansible all -a "/usr/bin/free"
* 4. ansible all -a "ls -l /var/log/messages"
* 5. ansible local -b -a "tail /var/log/messages"

Does this meet the goal?

Correct Answer: A

QUESTION 5

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.
Solution:
/home/sandy/ansible/apache.yml
EX447 dumps exhibit
/home/sandy/ansible/roles/sample-apache/tasks/main.yml
EX447 dumps exhibit
/home/sandy/ansible/roles/sample-apache/templates/index.html.j2
EX447 dumps exhibit
In /home/sandy/ansible/roles/sample-apache/handlers/main.yml
EX447 dumps exhibit

Does this meet the goal?

Correct Answer: A