Contd Solving Tomcat
- Exercise: Now try Writing an ansible playbook for install tomcat8 on ubuntu and centos
- ubuntu Refer Here
- centos Refer Here
- In tomcat_ubuntu.yaml the path of the tomcat is not correct, corrected this in this changeset Refer Here
- Lets define the variables in a playbook Refer Here
- It is better to seperate variables out in an external file so that variables can be changed easily Refer Here
- Now execute the playbook on ubuntu server

- The error message is as shown below

- We can fix the group issue by creating a group. Now lets rerun

- unzip package wasn’t found, so lets fix that problem Refer Here
- Now re-execute ansible playbook

- Now the manual step is
sudo ln -s /opt/tomcat/apache-tomcat-8.5.37 /opt/tomcat/latestand we have created the task Refer Here - Exercise: Try resolving the following steps
- sudo chown -R tomcat: /opt/tomcat
- sudo sh -c ‘chmod +x /opt/tomcat/latest/bin/*.sh’
- Exercise: Also ensure tomcat for centos installation till this step is also automated.
