/tomcatProvisioning

Tomcats from Apache website to machines defined in the host-inventory file using Ansible.

tomcatProvisioning

Tomcats from Apache website to virtual machines defined in the host-inventory file using ansible.


Apache allows APIs to download Tomcats, so we don't have to manually download Tomcats by accepting the license to the local drive at control host(where ansible is installed).

Location of all Tomcats-5, Location of all Tomcats-6, Location of all Tomcats-7, Location of all Tomcats-8, and Location of all Tomcats-9

  • Source(control machine) and Destination location(controlled machines) of Tomcats should be defined in variables file at /group_vars/all.yaml
  • Ansible module copies the Tomcats tarball from control to controlled machine, make a sha256 for tarball in file named as checksumDB at /Tomcat_Destination(usr/local/tomcat)/checksumDB
  • We are not deleting the tarball to make ansible not copy the same tomcat tarball again.

  • [tomcat] = host name for deploying Tomcat's to IPs given in hosts inventory file.

  • tarURL = name of the tarball downloaded from the web.

  • role: tomcat = role name for playing included tomcat playbook /roles/tomcat/tasks/main.yml

  • hosts: [tomcat] = hosts name where tasks needs to be performed via playbook /etc/ansible/hosts

The overall structure looks like

and

file: tomcatPlaybook.yaml
Directories:
  * roles
  * group_vars

How to run playbook

ansible-playbook tomcatPlaybook.yaml -K

Where -k = ask for privilege escalation password.

This is what resulted at Controlled machine(destination machine, where provisioning is done).

checksumDB file at Controlled machine(destination machine, where provisioning is done).