ansible-roles/tomcat/tasks/tomcat-pkgs.yml

45 lines
1.2 KiB
YAML
Raw Normal View History

---
- name: Install the tomcat packages
apt: pkg={{ item }} state={{ tomcat_pkg_state }}
with_items:
- tomcat'{{ tomcat_version }}'
- libtomcat'{{ tomcat_version }}'-java
- tomcat'{{ tomcat_version }}'-common
- libapr1
tags:
- tomcat
- name: Create the tomcat tmp directory
file: dest={{ tomcat_tmp_dir }} state=directory owner={{ tomcat_user }} group={{ tomcat_user }}
notify:
tomcat restart
tags:
- tomcat
- name: Configure tomcat defaults
template: src=tomcat-default.j2 dest=/etc/default/tomcat{{ tomcat_version }}
when:
- tomcat_install_default_conf is defined and tomcat_install_default_conf
notify:
tomcat restart
tags:
- tomcat
- name: Configure tomcat server.xml
template: src=tomcat-server.xml.j2 dest={{ tomcat_conf_dir }}/server.xml
when:
- tomcat_install_default_conf is defined and tomcat_install_default_conf
notify:
tomcat restart
tags:
- tomcat
- 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
tags:
- tomcat