DevOps Classroom Series – 29/Dec/2020

Contd Solving Tomcat

  • Exercise: Now try Writing an ansible playbook for install tomcat8 on ubuntu and centos
  • 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 Preview
  • The error message is as shown below Preview
  • We can fix the group issue by creating a group. Now lets rerun Preview
  • unzip package wasn’t found, so lets fix that problem Refer Here
  • Now re-execute ansible playbook Preview
  • Now the manual step is sudo ln -s /opt/tomcat/apache-tomcat-8.5.37 /opt/tomcat/latest and 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin