dm_pool_manager: add the ansible_ppa role as a dependency. Fix the maven_artifact behaviour.

This commit is contained in:
Andrea Dell'Amico 2017-09-14 19:01:11 +02:00
parent 0e94d276ec
commit 71d583d505
3 changed files with 16 additions and 10 deletions

View File

@ -12,7 +12,6 @@ dm_pool_prod_ghost_instance: 'PROTO_PROD_STAGING_HOST: dataminer-proto-ghost.d4s
dm_pool_dev_ghost_instance: 'DEV_STAGING_HOST: dataminer1-devnext.d4science.org' dm_pool_dev_ghost_instance: 'DEV_STAGING_HOST: dataminer1-devnext.d4science.org'
dm_pool_manager_pkgs: dm_pool_manager_pkgs:
- subversion - subversion
- 'ansible'
dm_pool_svn_url: https://svn.d4science.research-infrastructures.eu:443/gcube/trunk/data-analysis dm_pool_svn_url: https://svn.d4science.research-infrastructures.eu:443/gcube/trunk/data-analysis
svn_user: svn.d4science svn_user: svn.d4science

View File

@ -0,0 +1,4 @@
---
dependencies:
- role: '../library/roles/ansible_ppa'

View File

@ -1,18 +1,25 @@
--- ---
- block: - block:
- name: Remove the old dm_pool_manager files - name: Remove the old dm_pool_manager files
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=absent file: path={{ item }} state=absent
when: dm_pool_manager_upgrade with_items:
- '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}'
- '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}.{{ dm_pool_manager_extension }}'
become: True
become_user: '{{ d4science_user }}'
when: not dm_pool_manager_install
tags: [ 'smartgears', 'dm_pool_manager', 'tomcat' ]
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the dm_pool_manager - name: Get the dm_pool_manager
maven_artifact: artifact_id={{ dm_pool_manager_name }} version={{ dm_pool_manager_version | default(omit) }} group_id={{ dm_pool_manager_group_id }} extension={{ dm_pool_manager_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_user_home }}/{{ dm_pool_manager_file }} maven_artifact: artifact_id={{ dm_pool_manager_name }} version={{ dm_pool_manager_version | default(omit) }} group_id={{ dm_pool_manager_group_id }} extension={{ dm_pool_manager_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }}
- name: Create the dm_pool_manager working directory - name: Create the dm_pool_manager working directory
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the dm_pool_manager war - name: Unarchive the dm_pool_manager war
unarchive: copy=no src={{ smartgears_user_home }}/{{ dm_pool_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}/WEB-INF/lib unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}/WEB-INF/lib
- name: Install the dm-pool-manager web.xml template - name: Install the dm-pool-manager web.xml template
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/dataminer-pool-manager/WEB-INF/web.xml mode=0440 template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/dataminer-pool-manager/WEB-INF/web.xml mode=0440
@ -26,10 +33,6 @@
with_items: '{{ tomcat_m_instances }}' with_items: '{{ tomcat_m_instances }}'
notify: Restart smartgears notify: Restart smartgears
- name: Install the ansible repository
become_user: root
apt_repository: repo="deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" update_cache=yes state=present
- name: Install the packages required to dm-pool-manager-service - name: Install the packages required to dm-pool-manager-service
become_user: root become_user: root
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800 force=yes apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800 force=yes