43 lines
1,010 B
YAML
43 lines
1,010 B
YAML
---
|
|
- name: Create tomcat dirs
|
|
file:
|
|
path: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/{{ item }}"
|
|
state: directory
|
|
mode: "u=rwx,g=rwxs,o="
|
|
owner: "{{ tomcat_instance_name }}"
|
|
group: "{{ tomcat_instance_name }}"
|
|
with_items:
|
|
- 'conf'
|
|
- 'logs'
|
|
- 'webapps'
|
|
- 'work'
|
|
- 'temp'
|
|
- 'lib'
|
|
|
|
- name: Templating of config file
|
|
template:
|
|
src: 'templates/{{ item }}.j2'
|
|
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/{{ item }}"
|
|
mode: "0660"
|
|
owner: "{{ tomcat_instance_name }}"
|
|
group: "{{ tomcat_instance_name }}"
|
|
force: no
|
|
with_items:
|
|
- server.xml
|
|
- env
|
|
|
|
- name: Copy config file
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/{{ item }}"
|
|
mode: "0660"
|
|
owner: "{{ tomcat_instance_name }}"
|
|
group: "{{ tomcat_instance_name }}"
|
|
force: no
|
|
with_items:
|
|
- catalina.properties
|
|
- logging.properties
|
|
- context.xml
|
|
- tomcat-users.xml
|
|
- web.xml
|