2017-01-03 12:41:19 +01:00
|
|
|
---
|
|
|
|
- name: Create tomcat dirs
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.file:
|
2017-01-03 12:41:19 +01:00
|
|
|
path: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/{{ item }}"
|
|
|
|
state: directory
|
2017-05-21 19:33:52 +02:00
|
|
|
mode: "u=rwx,g=rwxs,o="
|
2017-03-02 17:22:33 +01:00
|
|
|
owner: "{{ tomcat_instance_name }}"
|
|
|
|
group: "{{ tomcat_instance_name }}"
|
2021-05-04 14:18:40 +02:00
|
|
|
loop:
|
2017-01-03 12:41:19 +01:00
|
|
|
- 'conf'
|
|
|
|
- 'logs'
|
|
|
|
- 'webapps'
|
|
|
|
- 'work'
|
|
|
|
- 'temp'
|
|
|
|
- 'lib'
|
|
|
|
|
2019-02-20 11:29:11 +01:00
|
|
|
- name: Templating of env file
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.template:
|
2019-02-20 11:29:11 +01:00
|
|
|
src: 'templates/env.j2'
|
|
|
|
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/env"
|
|
|
|
mode: "0660"
|
|
|
|
owner: "{{ tomcat_instance_name }}"
|
|
|
|
group: "{{ tomcat_instance_name }}"
|
2023-06-28 13:22:59 +02:00
|
|
|
force: false
|
2019-02-20 11:29:11 +01:00
|
|
|
|
|
|
|
- name: Templating of server.xml file
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.template:
|
2019-02-20 11:29:11 +01:00
|
|
|
src: 'templates/server.xml-tomcat{{ tomcat_version }}.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 }}"
|
2023-06-28 13:22:59 +02:00
|
|
|
force: false
|
2017-03-02 17:22:33 +01:00
|
|
|
|
2017-05-10 17:08:55 +02:00
|
|
|
- name: Copy config file
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.copy:
|
2017-05-10 17:08:55 +02:00
|
|
|
src: "{{ item }}"
|
2019-03-06 15:46:10 +01:00
|
|
|
dest: "{{ tomcat_instance_root }}/{{ tomcat_instance_name }}/conf/{{ item | basename }}"
|
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 }}"
|
2023-06-28 13:22:59 +02:00
|
|
|
force: false
|
2019-03-06 15:46:10 +01:00
|
|
|
with_fileglob:
|
|
|
|
- "tomcat{{ tomcat_version }}/*"
|