Goals of this project to automate Tomcat application server deployment on multi environment – Dev & Prod.


  1. Install Ansible control engine on development platform.
  2. Install Visual Code on development platform.
  3. Deploy Ansible Control Node, Dev Application server & Prod Application Server as per the above architecture.


Develop Ansible Role to provision tomcat application server on target environment as per below configuration

  1. Install common dependencies AWS-CLI, wget, curl, git
  2. Install Java 11
  3. Download and install tomcat into CATALINA HOME  ‘/usr/local/tomcat’
  4. Configure systemd service to manage ‘tomcat’ service.
  5. Configure tomcat user ‘admin’ and assign manager & admin role access.
  6. Integrate Ansible vault to store the tomcat user ‘admin’ passwords.
  7. Restart Apache tomcat service only when tomcat configuration file changes.


  1. Run Ansible Playbook to invoke the Role and configure the Dev environment
  2. Run Ansible Playbook to invoke the Role and configure the Prod environment
  3. Access Tomcat page using curl from Ansible control node.

Note:  Goal is to achieve the desired configuration on target nodes, this project not listed any specific best practices to follow, But recommended to apply variables, secure passwords, handlers, custom inventory path etc..

© Edwiki Trainings – Click HERE If you are interested to learn more on Cloud & DevOps stack.

  1. I completed assignment with configuring VPC end points to start the SSM session to connect to the control node which is running in Private subnet.
    PR@ please let us know is there any way to connect to the instances in Private subnet.

  2. Hi think that you will need to have a NAT in a public subnet, then configure a route table for that NAT GW, and probabily make some add in inboudns rules in SG. I hope that helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like