DevOps Classroomnotes 03/Jan/2023

Ansible Playbook to automate the tomcat installation

  • Lets try to install tomcat 10 on ubuntu 22.04 Refer Here
  • Refer Here for the changes made to create a tomcat user
  • On execution of the playbook we got an issue with tomcat group not present
    Preview
  • Refer Here for the changes to fix the group not existing and rerun the playbook
    Preview
  • Refer Here for the changes to download the tomcat into tmp folder
  • Refer Here for replacing the extra download step and use remote src in unarchive
  • Refer Here for the changes made to change ownership and create the symbolic link
  • Refer Here for setting recursive permissions on the folder.
  • The next step to be automated is sudo sh -c 'chmod +x /opt/tomcat/latest/bin/*.sh'. Here there are approximately 12 files in 10.1.4 version to be changed.
  • For automating above lets use ansible.builtin.command or shell, these modules are not idempotent i.e. it gets executed every time when ansible playbook is executed (this should be last resort). This needs to be fixed but for now lets use the command directly
  • Refer Here for the changes to fix the shell file permissions

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner