2017-01-03 12:41:19 +01:00
|
|
|
---
|
|
|
|
- name: Create tomcat dirs
|
|
|
|
file:
|
|
|
|
path: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/{{ item }}"
|
|
|
|
state: directory
|
2017-01-05 11:58:01 +01:00
|
|
|
mode: "2770"
|
2017-03-02 17:22:33 +01:00
|
|
|
owner: "{{ tomcat_instance_name }}"
|
|
|
|
group: "{{ tomcat_instance_name }}"
|
2017-01-03 12:41:19 +01:00
|
|
|
with_items:
|
|
|
|
- 'conf'
|
|
|
|
- 'logs'
|
|
|
|
- 'webapps'
|
|
|
|
- 'work'
|
|
|
|
- 'temp'
|
|
|
|
- 'lib'
|
|
|
|
|
|
|
|
- name: Copy server.xml
|
|
|
|
template:
|
|
|
|
src: 'templates/server.xml.j2'
|
|
|
|
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/server.xml"
|
2017-03-23 16:59:43 +01:00
|
|
|
mode: "0660"
|
2017-03-02 17:22:33 +01:00
|
|
|
owner: "{{ tomcat_instance_name }}"
|
|
|
|
group: "{{ tomcat_instance_name }}"
|
|
|
|
force: no
|
|
|
|
|
|
|
|
- name: Copy conf dir
|
|
|
|
shell: "cp /usr/share/tomcat7/skel/conf/* {{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/"
|
|
|
|
args:
|
|
|
|
creates: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/catalina.properties"
|
2017-01-03 12:41:19 +01:00
|
|
|
|
|
|
|
- name: Copy env file
|
|
|
|
template:
|
|
|
|
src: 'templates/env.j2'
|
|
|
|
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/env"
|
2017-03-23 16:59:43 +01:00
|
|
|
mode: "0660"
|
2017-01-03 12:41:19 +01:00
|
|
|
owner: "{{ tomcat_instance_name }}"
|
|
|
|
group: "{{ tomcat_instance_name }}"
|
2017-03-02 17:22:33 +01:00
|
|
|
force: no
|