Create a setup of 3 ubuntu Servers where one of the servers is the Master server where the Ansible is installed whereas the other 2 webservers are managed nodes.
1. Create a playbook to install apache on the webservers
2. Create a playbook to start an apache service on webservers
3. Create a playbook to create a file /tmp/status with dynamic contents on dbservers.(vars_prompt)
4. Create a playbook to copy /tmp/status.txt file to web servers /tmp/status.txt
5. Create a playbook to Stop the apache service and delete /tmp/status.txt and also uninstall the apache service ( create a separate play for uninstalling the apache service).
6. Create a playbook where you define a variable called testvar and the value of the variable should be entered at run time if the value of a variable is Testing then create a file /tmp/testfile.txt and write the content that “Testing is in progress” on webservers.
7. Create a playbook to install apache (apache2 for Ubuntu and httpd for CentOs) on webservers ( consider webservers are either CentOs or Ubuntu System).
8. Start httpd service on webservers which are CentOs.
9. Remove apache from Webserver if the OS family is Debian and OS is Ubuntu.
10. Create a user John on Debian based OS webservers. (use user module) and verify that user created.(cat /etc/passwd | grep John| wc -l)