forked from ISTI-ansible-roles/ansible-roles
thredds: install the configuration files only at initialization time (or when a specific file does not exist). Needed because the same file will be changed programmatically.
This commit is contained in:
parent
c05dd230c2
commit
3fbece53d6
|
@ -17,12 +17,23 @@
|
|||
file: path={{ thredds_data_content_dir }} state=directory owner={{ item.user }} group={{ item.user }}
|
||||
with_items: '{{ tomcat_m_instances }}'
|
||||
|
||||
- name: Check if the configuration files were already initialized with our versions
|
||||
stat: path={{ thredds_data_content_dir }}/thredds/.conf_initialized
|
||||
register: thredds_skip_conf
|
||||
tags: [ 'thredds', 'tomcat', 'thredds_conf' ]
|
||||
|
||||
- name: Install the Thredds configuration files
|
||||
template: src={{ item }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item }} mode=444
|
||||
template: src={{ item }}.j2 dest={{ thredds_data_content_dir }}/thredds/{{ item }} owner={{ item.user }} group={{ item.user }} mode=644
|
||||
with_items:
|
||||
- threddsConfig.xml
|
||||
- catalog.xml
|
||||
notify: tomcat instances restart
|
||||
when: not thredds_skip_conf.stat.exists
|
||||
tags: [ 'thredds', 'tomcat', 'thredds_conf' ]
|
||||
|
||||
- name: Create the file that states that the thredds instance has been configured
|
||||
copy: content="initialized by ansible" dest={{ thredds_data_content_dir }}/thredds/.conf_initialized mode=0400
|
||||
register: thredds_skip_conf
|
||||
tags: [ 'thredds', 'tomcat', 'thredds_conf' ]
|
||||
|
||||
- name: Get the thredds war file
|
||||
|
|
Loading…
Reference in New Issue