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