Merge branch 'master' of gitorious.research-infrastructures.eu:infrastructure-management/ansible-playbooks

This commit is contained in:
Roberto Cirillo 2016-10-05 15:00:36 +02:00
commit fd83d29809
3 changed files with 10 additions and 65 deletions

View File

@ -1,20 +1,20 @@
---
- name: Install the Ubuntu PPA for nginx
apt_repository: repo='{{ nginx_ppa_repo }}'
apt_repository: repo='{{ nginx_ppa_repo }}' update_cache=yes
when:
- nginx_use_ppa
- "'{{ ansible_distribution }}' == 'Ubuntu'"
tags: [ 'nginx', 'nginx_ppa' ]
- name: Install the nginx web server
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
with_items:
- nginx-full
when: not nginx_use_ldap_pam_auth
tags: nginx
- name: Install the nginx web server if we need ldap auth via pam
apt: pkg={{ item }} state=installed
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes cache_valid_time=1800
with_items:
- nginx-extras
when: nginx_use_ldap_pam_auth

View File

@ -4,8 +4,14 @@
unarchive: src={{ dataminer_zip_url }} dest={{ smartgears_instance_path }}/webapps copy=no
notify: Restart smartgears
- name: Create a directory where to install the gebco_08.nc data file
file: path={{ smartgears_user_home }}/data state=directory
- name: Install the gebco_08.nc file from thredds. It is big, mostly 2GB
get_url: url={{ dataminer_data_file_from_thredds }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/gebco_08.nc
get_url: url={{ dataminer_data_file_from_thredds }} dest={{ smartgears_user_home }}/data/gebco_08.nc
- name: Create a symlink to the gebco_08.nc file
file: src={{ smartgears_user_home }}/data/gebco_08.nc dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/gebco_08.nc state=link
notify: Restart smartgears
- name: Install the script that fixes the WPS configuration

View File

@ -1,61 +0,0 @@
---
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the 52 north application war file
remote_user: root
become: True
become_user: '{{ smartgears_user }}'
get_url: url={{ dataminer_52north_webapp_url }} dest={{ smartgears_user_home }}/{{ dataminer_52north_webapp_file }}
when: dataminer_app_install
tags: [ 'tomcat', 'dataminer', 'wps' ]
- name: Create the 52 north webapp directory and subdirectories
remote_user: root
become: True
become_user: '{{ smartgears_user }}'
file: dest={{ smartgears_instance_path }}/webapps/{{ item }} state=directory mode=0755
with_items:
- '{{ dataminer_52north_webapp_name }}'
- '{{ dataminer_52north_webapp_name }}/persistence'
# - '{{ dataminer_52north_webapp_name }}/ecocfg'
when: dataminer_app_install
tags: [ 'tomcat', 'dataminer', 'wps' ]
- name: Unarchive the 52 north webapp distribution
remote_user: root
become: True
become_user: '{{ smartgears_user }}'
unarchive: copy=no src={{ smartgears_user_home }}/{{ dataminer_52north_webapp_file }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}
args:
creates: '{{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/classes/52N_license.txt'
register: install_52_north
notify: Restart smartgears
when: dataminer_app_install
tags: [ 'tomcat', 'dataminer', 'wps' ]
- name: Remove the original web.xml file
remote_user: root
become: True
become_user: '{{ smartgears_user }}'
file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/web.xml state=absent
notify: Restart smartgears
when: ( install_52_north | changed )
tags: [ 'tomcat', 'dataminer', 'wps' ]
# Transform the 52n-wps app in a gcube enabled app
- name: Download the gcube web.xml config file
remote_user: root
become: True
become_user: '{{ smartgears_user }}'
get_url: url={{ dataminer_gcube_web_xml }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/web.xml
notify: Restart smartgears
when: dataminer_app_install
tags: [ 'tomcat', 'dataminer', 'wps' ]
- name: Download the gcube gcube-app.xml config file
remote_user: root
become: True
become_user: '{{ smartgears_user }}'
get_url: url={{ dataminer_gcube_app_xml }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/gcube-app.xml
notify: Restart smartgears
when: dataminer_app_install
tags: [ 'tomcat', 'dataminer', 'wps' ]