Group ownership to www-data for the log directory when requested.
This commit is contained in:
parent
d226826ce8
commit
2207a272eb
|
@ -28,6 +28,7 @@ tomcat_m_manager_status_r: "manager-status"
|
||||||
|
|
||||||
tomcat_m_instances_base_path: '/var/lib/tomcat_instances'
|
tomcat_m_instances_base_path: '/var/lib/tomcat_instances'
|
||||||
tomcat_m_instances_logdir_base: '/var/log/tomcat_instances'
|
tomcat_m_instances_logdir_base: '/var/log/tomcat_instances'
|
||||||
|
tomcat_m_expose_log_directory: False
|
||||||
tomcat_m_cache_base: '/var/cache/tomcat-instances'
|
tomcat_m_cache_base: '/var/cache/tomcat-instances'
|
||||||
tomcat_m_default_user: 'tomcat{{ tomcat_version }}'
|
tomcat_m_default_user: 'tomcat{{ tomcat_version }}'
|
||||||
tomcat_m_use_default_user: True
|
tomcat_m_use_default_user: True
|
||||||
|
|
|
@ -36,6 +36,14 @@
|
||||||
file: dest={{ tomcat_m_instances_logdir_base }}/{{ item.http_port }} owner={{ item.user }} group={{ item.user }} mode='0750' state=directory
|
file: dest={{ tomcat_m_instances_logdir_base }}/{{ item.http_port }} owner={{ item.user }} group={{ item.user }} mode='0750' state=directory
|
||||||
with_items: '{{ tomcat_m_instances }}'
|
with_items: '{{ tomcat_m_instances }}'
|
||||||
register: tomcat_first_install
|
register: tomcat_first_install
|
||||||
|
when: not tomcat_m_expose_log_directory
|
||||||
|
tags: [ 'tomcat', 'tomcat_instances', 'tomcat_log_dir' ]
|
||||||
|
|
||||||
|
- name: Create log dirs, readable by the user that runs the http service
|
||||||
|
file: dest={{ tomcat_m_instances_logdir_base }}/{{ item.http_port }} owner={{ item.user }} group='www-data' mode='0750' state=directory
|
||||||
|
with_items: '{{ tomcat_m_instances }}'
|
||||||
|
register: tomcat_first_install
|
||||||
|
when: tomcat_m_expose_log_directory
|
||||||
tags: [ 'tomcat', 'tomcat_instances', 'tomcat_log_dir' ]
|
tags: [ 'tomcat', 'tomcat_instances', 'tomcat_log_dir' ]
|
||||||
|
|
||||||
- name: Create the instances work dirs
|
- name: Create the instances work dirs
|
||||||
|
|
Loading…
Reference in New Issue