Exit demo EX447 Red Hat Certified Specialist in Advanced Automation: Ansible Best Practices PDF format · free preview

Red Hat EX447 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/ex447.html

Question 1
Lab simulation

FILL BLANK

Create a file called specs.empty in home/bob/ansible on the local machine as follows:

HOST=

MEMORY=

BIOS=

VDA_DISK_SIZE=

VDB_DISK_SIZE=

Create the playbook /home/bob/ansible/specs.yml which copies specs.empty to all remote nodes' path / root/specs.txt. Using the specs.yml playbook then edit specs.txt on the remote machines to reflect theappropriate ansible facts.

Question 2
Lab simulation

FILL BLANK

Create a file calledadhoc.shin/home/sandy/ansiblewhich will use adhoc commands to set up anew repository. The name of the repo will be 'EPEL' the description 'RHEL8' the baseurl is'https:// dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rmp'there is no gpgcheck, but you should enable the repo.

* You should be able to use an bash script using adhoc commands to enable repos. Depending on your
lab setup, you may need to make this repo "state=absent" after you pass this task.

Question 3
Lab simulation

FILL BLANK

Create a file calledrequirements.ymlin/home/sandy/ansible/rolesto 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.

Question 4
Lab simulation

FILL BLANK

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

Question 5
Lab simulation

FILL BLANK

Create a playbook calledwebdev.ymlin'home/sandy/ansible. The playbook will create a directory Avcbdev on dev host. The permission of the directory are 2755 and owner is webdev. Create a symbolic link from/
Webdevto /var/www/html/webdev. Serve a file from Avebdev7index.html which displays the text
"Development" Curlhttp://node1.example.com/webdev/index.htmlto test

Question 6
Lab simulation

FILL BLANK

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".

Question 7
Lab simulation

FILL BLANK
Create an ansible 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.

Question 8
Lab simulation

FILL BLANK

Create a file calledpackages.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 tothe latest.

Question 9
Lab simulation

FILL BLANK

Create the users in the fileusersjist.ymlfile provided. Do this in a playbook called users.yml located at/ home/sandy/ansible.The passwords for these users should be set using thelock.ymlfile from TASK7. When running the playbook, the lock.yml file should be unlocked withsecret.txtfile from TASK 7.

All users with the job of 'developer' should be created on thedevhosts, add them to the group devops, their password should be set using thepw_devvariable. Likewise create users with the job of 'manager' on theproxyhost and add the users to the group 'managers', their password should be set using thepw_mgrvariable.

Question 10
Lab simulation

FILL BLANK

Create a jinja template in /home/sandy/ansible/ and name it hosts.j2. Edit this file so it looks like the one below. The order of the nodes doesn't matter. Then create a playbook in /home/sandy/ ansiblecalledhosts.ymland install the template on dev node at /root/myhosts

Showing 10 of 26 questions · Unlock the full set