Ansible Tomcat installation Contd
- We are suppose to continue from system d unit file creation Refer Here
- We need to copy tomcat.service file from ansible control node to remote nodes. Refer Here for the module used
- Refer Here for the changes done
- Now we need to reload the daemon, enable and start the service
- Refer Here for the changes done
- Now access tomcat (Ensure 8080 port is opened in security groups)
- Lets configure Management interfaces Refer Here for manual steps
- Refer Here for the changes done to accomodate host manager app configuration
- Now execute the ansible playbook
- Access tomcat hostmanager and manager
-
Manager is working
- Host manager is failing and fixed the issue as xml was incomplete. Refer Here for the changes done
Possible fixes
- When we execute ansible playbook on the node where everything is installed, changes shouldn’t happen. But as of now there are changes during every execution done by ansible
- Context xml with same contents is created as two files and two times the copy is handled in two tasks
- Ansible playbook which we have written works only for ubuntu, we need to extend this to work for other linux distributions.
- If we need to make this playbook work for future versions of tomcat it will not as we have hardcoded 10.1.4
- If we want extend this playbook to install any version of java
Exercises
- Install lamp stack on ubuntu 20.04 (skip ufw and mysql) Refer Here
- Rather than virtual hosts file create a file info.php in /var/www/html/info.php
<?php
phpinfo();
?>