2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Install the tomcat packages
|
|
|
|
apt: pkg={{ item }} state={{ tomcat_pkg_state }}
|
2016-03-01 18:49:38 +01:00
|
|
|
with_items: '{{ tomcat_pkgs }}'
|
2015-07-16 13:25:02 +02:00
|
|
|
tags: tomcat
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Create the tomcat tmp directory
|
|
|
|
file: dest={{ tomcat_tmp_dir }} state=directory owner={{ tomcat_user }} group={{ tomcat_user }}
|
2015-07-16 13:25:02 +02:00
|
|
|
notify: tomcat restart
|
2017-09-15 12:44:48 +02:00
|
|
|
tags: tomcat
|
|
|
|
|
|
|
|
- name: Create the catalina temp directory, if different from the default
|
|
|
|
file: dest={{ catalina_tmp_directory }} state=directory owner={{ tomcat_user }} group={{ tomcat_user }}
|
|
|
|
when: catalina_tmp_directory is defined
|
|
|
|
notify: tomcat restart
|
2015-07-16 13:25:02 +02:00
|
|
|
tags: tomcat
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Configure tomcat defaults
|
|
|
|
template: src=tomcat-default.j2 dest=/etc/default/tomcat{{ tomcat_version }}
|
2015-07-16 13:25:02 +02:00
|
|
|
when: tomcat_install_default_conf
|
|
|
|
notify: tomcat restart
|
2016-03-03 18:55:27 +01:00
|
|
|
tags: [ 'tomcat', 'tomcat_default' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Configure tomcat server.xml
|
|
|
|
template: src=tomcat-server.xml.j2 dest={{ tomcat_conf_dir }}/server.xml
|
2015-08-24 15:56:46 +02:00
|
|
|
when: tomcat_install_server_xml
|
2015-07-16 13:25:02 +02:00
|
|
|
notify: tomcat restart
|
2016-03-03 18:55:27 +01:00
|
|
|
tags: [ 'tomcat', 'tomcat_serverxml' ]
|
2015-07-16 13:25:02 +02:00
|
|
|
|
|
|
|
- name: Install a slightly modified catalina.properties
|
|
|
|
copy: src=catalina.properties dest={{ tomcat_conf_dir }}/catalina.properties owner=root group={{ tomcat_user }} mode=0644
|
|
|
|
when: tomcat_install_default_conf
|
|
|
|
notify: tomcat restart
|
2016-03-03 18:55:27 +01:00
|
|
|
tags: [ 'tomcat', 'tomcat_catalinaprops' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Create some directories that the package do not creates itself
|
|
|
|
file: dest={{ tomcat_catalina_home_dir }}/{{ item }} state=directory owner={{ tomcat_user }} group={{ tomcat_user }} mode=0755
|
|
|
|
with_items:
|
|
|
|
- common/classes
|
|
|
|
- server/classes
|
|
|
|
- shared/classes
|
2015-07-16 13:25:02 +02:00
|
|
|
tags: tomcat
|