2016-07-29 16:00:06 +02:00
|
|
|
---
|
2017-01-23 19:30:27 +01:00
|
|
|
- block:
|
2016-07-29 16:00:06 +02:00
|
|
|
- name: Remove the old fhn-manager files
|
2017-10-11 16:43:24 +02:00
|
|
|
file: path={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }}'
|
|
|
|
- '{{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }}.{{ fhn_extension }}'
|
2017-09-25 18:14:51 +02:00
|
|
|
notify: Restart smartgears
|
|
|
|
|
|
|
|
become: True
|
|
|
|
become_user: '{{ d4science_user }}'
|
|
|
|
when: not fhn_manager_install
|
|
|
|
tags: [ 'smartgears', 'fhn_manager', 'tomcat' ]
|
|
|
|
|
2017-01-23 19:30:27 +01:00
|
|
|
|
2017-09-25 18:14:51 +02:00
|
|
|
- block:
|
2016-07-29 16:00:06 +02:00
|
|
|
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
|
|
|
- name: Get the fhn-manager-service
|
2017-09-25 18:14:51 +02:00
|
|
|
maven_artifact: artifact_id={{ fhn_manager_name }} version={{ fhn_manager_version | default(omit) }} group_id={{ fhn_group_id }} extension={{ fhn_extension | default('war') }} repository_url={{ fhn_manager_repository_url }} dest={{ smartgears_downloads_dir }}/{{ fhn_manager_file }}
|
|
|
|
register: fhn_mgr_download
|
2017-02-27 15:34:58 +01:00
|
|
|
|
2017-09-25 18:14:51 +02:00
|
|
|
- name: Remove the old fhn-manager files
|
|
|
|
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=absent
|
|
|
|
when: ( fhn_mgr_download | changed )
|
|
|
|
notify: Restart smartgears
|
|
|
|
|
|
|
|
- name: Copy the fhn_manager war file to its destination place
|
|
|
|
copy: src={{ smartgears_downloads_dir }}/{{ fhn_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }}.{{ fhn_extension }} force=yes remote_src=yes
|
2016-07-29 16:00:06 +02:00
|
|
|
notify: Restart smartgears
|
|
|
|
|
2017-10-11 16:43:24 +02:00
|
|
|
- name: Install the cron job that deletes the certificates from /tmp every day
|
2017-10-02 18:12:53 +02:00
|
|
|
cron: name="Delete tmp folder" special_time=daily job="find /tmp ! -name 'x509up_u1000' -type f -exec rm -f {} \; >/dev/null 2>&1"
|
|
|
|
|
2017-10-06 10:14:58 +02:00
|
|
|
- name: Install the cron job that refresh certificates every week
|
|
|
|
become_user: root
|
2017-10-06 11:27:28 +02:00
|
|
|
cron: name="refresh certificates" special_time=weekly job="/usr/sbin/fetch-crl >/dev/null 2>&1"
|
2017-10-06 10:14:58 +02:00
|
|
|
|
2016-07-29 16:00:06 +02:00
|
|
|
become: True
|
|
|
|
become_user: '{{ d4science_user }}'
|
2017-01-23 19:30:27 +01:00
|
|
|
when: fhn_manager_install
|
2016-07-29 16:00:06 +02:00
|
|
|
tags: [ 'smartgears', 'fhn_manager', 'tomcat' ]
|