smartgears: Try some workaround to be able to use 'latest' as a version.

This commit is contained in:
Andrea Dell'Amico 2017-09-28 15:41:29 +02:00
parent 6955e3be7f
commit 7186cb3c1a
1 changed files with 15 additions and 2 deletions

View File

@ -3,6 +3,12 @@
file: dest={{ smartgears_downloads_dir }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
tags: [ 'smartgears', 'tomcat', 'smartgears_download_dir', 'smartgears_downloads_dir' ]
- name: Remove the old smartgears-distribution files under the smartgears user home directory.
shell: rm -fr {{ smartgears_user_home }}/smartgears-distribution-* ; touch {{ smartgears_user_home }}/.smartgears_distribution_cleaned
args:
creates: '{{ smartgears_user_home }}/.smartgears_distribution_cleaned'
tags: [ 'smartgears', 'tomcat' ]
- name: Remove the smartgears distribution archive to force un upgrade
file: dest={{ item }} state=absent
with_items:
@ -11,6 +17,10 @@
when: smartgears_force_install
tags: [ 'smartgears', 'tomcat' ]
- name: Remove the smartgears-distribution files
shell: rm -fr {{ smartgears_downloads_dir }}/smartgears-distribution-*
tags: [ 'smartgears', 'tomcat' ]
- name: Get the smartgears distribution
become: True
become_user: '{{ smartgears_user }}'
@ -23,7 +33,7 @@
- name: Unarchive the smartgears distribution
become: True
become_user: '{{ smartgears_user }}'
unarchive: remote_src=yes src={{ smartgears_downloads_dir }}/{{ smartgears_file }} dest={{ smartgears_user_home }}
unarchive: remote_src=yes src={{ smartgears_downloads_dir }}/{{ smartgears_file }} dest={{ smartgears_downloads_dir }}
with_items: '{{ tomcat_m_instances }}'
when:
- not item.skip_smartgears
@ -53,7 +63,10 @@
tags: [ 'smartgears', 'tomcat', 'smartgears_env' ]
- name: Install the smartgears app
shell: cd {{ item.user_home }}/smartgears-distribution-{{ smartgears_distribution_version }} ; . /{{ item.user_home }}/.bashrc ; ./install -s tomcat ; chown -R gcube:gcube '{{ item.user_home }}/smartgears-distribution-{{ smartgears_distribution_version }}' '{{ item.user_home }}/SmartGears/' '{{ item.user_home }}/tomcat/lib/' '{{ item.user_home }}/tomcat/webapps/'
become: True
become_user: '{{ smartgears_user }}'
#shell: cd {{ smartgears_downloads_dir }}/smartgears-distribution-* ; . /{{ item.user_home }}/.bashrc ; ./install -s tomcat ; chown -R gcube:gcube '{{ item.user_home }}/smartgears-distribution-{{ smartgears_distribution_version }}' '{{ item.user_home }}/SmartGears/' '{{ item.user_home }}/tomcat/lib/' '{{ item.user_home }}/tomcat/webapps/'
shell: cd {{ smartgears_downloads_dir }}/smartgears-distribution-* ; . /{{ item.user_home }}/.bashrc ; ./install -s tomcat'
with_items: '{{ tomcat_m_instances }}'
when:
- ( smartgears_download | changed )