CORRECT TEXT

Posted by: Pdfprep Category: EX294 Tags: , ,

CORRECT TEXT

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.html Whenever the content of the file changes, restart the webserver service.

Welcome to [FQDN] on [IP]

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

Answer: /home/sandy/ansible/apache.yml

/home/sandy/ansible/roles/sample-apache/tasks/main.yml /home/sandy/ansible/roles/sample-apache/templates/index.html.j2

In /home/sandy/ansible/roles/sample-apache/handlers/main.yml

Leave a Reply

Your email address will not be published.