Halloween Special Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > RedHat > Red Hat Certified Architect (RHCA) > EX447

EX447 Red Hat Certified Specialist in Advanced Automation: Ansible Best Practices Question and Answers

Question # 4

Create a playbook called issue.yml in /home/sandy/ansible which changes the file /etc/issue on all managed nodes: If host is a member of (lev then write "Development" If host is a member oftestthen write "Test" If host is a member ofprodthen write "Production"

Full Access
Question # 5

Create a role called sample-apache in/home/sandy/ansible/rolesthat enables and starts httpd, enables and starts the firewall and allows the webserver service. Create a template calledindex.html.j2which creates and serves a message from/var/www/html/index.htmlWhenever the content of the file changes, restart the webserver service.

Welcome to [FQDN] on [IP]

Replace the FQDN with the fully qualified domain name and IP with the ip address of the node using ansible facts. Lastly, create a playbook in/home/sandy/ansible/calledapache.ymland use the role to serve the index file on webserver hosts.

Full Access
Question # 6

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'

Full Access
Question # 7

Create a file in/home/sandy/ansible/calledreport.yml.Using this playbook, get a filecalledreport.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 informationofthehosts. Ifa disk does not exist then write NONE.

Full Access