Playbook executed as sudo user – with ssh key and sudo password: $ ansible-playbook -i hosts tomcat-setup.yml -ask-become-pass Playbook executed as sudo user – with password: $ ansible-playbook -i hosts tomcat-setup.yml -ask-pass -ask-become-pass Playbook executed as root user – with password: $ ansible-playbook -i hosts tomcat-setup.yml -ask-pass Playbook executed as root user – with ssh key: $ ansible-playbook -i hosts tomcat-setup.yml Once all values are updated, you can then run the playbook against your nodes. become: yesīecome_method: sudo Step 3: Install Apache Tomcat 9 With Ansible When using non root remote user, become_method is necessary. Ui_admin_username: admin # User who can access bpth manager and admin UI sectionsĬheck Tomcat version on the releases page. Ui_manager_pass: # UI manager user password Ui_manager_user: manager # User who can access the UI manager section only Tomcat_ver: 9.0.52 # Tomcat version to install Remote_user: root # Update username for remote server Hosts: tomcat-nodes # Inventory hosts group / server to act on Update variables in playbook file – Set Tomcat version, remote user and Tomcat UI access credentials.The tomcat ansible role is available publicly on Github for use. Python version = 3.6.8 (default, May 19 2021, 03:00:47) Step 2: Clone Ansible role from Github Sudo apt-key adv -keyserver -recv-keys 93C4A3FD7BB9C367Ĭonfirm ansible installation: $ ansible -versionĬonfigured module search path = Īnsible python module location = /usr/lib/python3.6/site-packages/ansible Sudo apt-add-repository -yes -update ppa:ansible/ansibleĮcho "deb trusty main" | sudo tee /etc/apt//ansible.list Sudo apt -y update sudo apt -y install software-properties-common Sudo yum -y install epel-release & sudo yum -y install ansible Install Ansible on your Linux system using the commands shared below. ![]() The main dependency on your Workstation is Ansible. This Ansible installation won’t work for Upstart or Sysvinit. I assume you have a CentOS 7+, Ubuntu 16.04+ system with Systemd service manager. The link to the Github project is shared below.Īnsible role to setup tomcat Environment Setup I wrote an Ansible role to simplify the process. This guide will discuss a better way, which is automated and can be reproduced easily. The standard way of installing Tomcat on a Linux system such as Ubuntu/CentOS/Debian is manual and time-consuming. It is widely deployed and powers various mission-critical web applications around the world. Tomcat is an implementation of the Java Servlet, JavaServer Pages, Java Expression Language, and Java WebSocket technologies. Apache Tomcat is a free and open-source HTTP server designed to serve Java web pages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |