Ansible contd
Activity 4: Install tomcat (contd)
- Manual Steps:
- Create tomcat application accounts
- Allow remote host access to manager and hostmanager
- Create a Systemd Service File
- Refer Here for the changes done
- Refer Here for the changes done to become at play level
-
Now execute the playbook
-
Problems to be addressed:
- avoid hardcoding in configuration files such as context.xml service etc.
- make this playbook work on other distributions
Templates
- Templates help in bringing in dynamic content.
- Ansible adopts templating from popular jinja2 templating used in python Refer Here
- We adopted template but didn’t implement any dynamic templating sofar in the following changeset Refer Here
- Refer Here for jinja2 examples
- Refer Here for the changes with templates
Exercise
- Use ansible to install nop commerce (skip mysql) Refer Here
- use ansible to install docker and add user to the docker group Refer Here
sudo usermod -aG docker <username>
- Use the ansible to install postgresql
