forked from ISTI-ansible-roles/ansible-roles
smartgears: Set the real smartgears version into container.xml, when using 'latest' from maven.
This commit is contained in:
parent
7186cb3c1a
commit
94fae10e18
|
@ -9,18 +9,6 @@
|
||||||
creates: '{{ smartgears_user_home }}/.smartgears_distribution_cleaned'
|
creates: '{{ smartgears_user_home }}/.smartgears_distribution_cleaned'
|
||||||
tags: [ 'smartgears', 'tomcat' ]
|
tags: [ 'smartgears', 'tomcat' ]
|
||||||
|
|
||||||
- name: Remove the smartgears distribution archive to force un upgrade
|
|
||||||
file: dest={{ item }} state=absent
|
|
||||||
with_items:
|
|
||||||
- '{{ smartgears_downloads_dir }}/{{ smartgears_file }}'
|
|
||||||
- '{{ smartgears_user_home }}/smartgears-distribution-{{ smartgears_distribution_version }}'
|
|
||||||
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
|
- name: Get the smartgears distribution
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
|
@ -30,6 +18,11 @@
|
||||||
when: not item.skip_smartgears
|
when: not item.skip_smartgears
|
||||||
tags: [ 'smartgears', 'tomcat' ]
|
tags: [ 'smartgears', 'tomcat' ]
|
||||||
|
|
||||||
|
- name: Remove the smartgears-distribution files
|
||||||
|
shell: find . -type d -name {{ smartgears_downloads_dir }}/smartgears-distribution-\* -exec rm -fr {} \;
|
||||||
|
when: ( smartgears_download | changed )
|
||||||
|
tags: [ 'smartgears', 'tomcat' ]
|
||||||
|
|
||||||
- name: Unarchive the smartgears distribution
|
- name: Unarchive the smartgears distribution
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
|
@ -65,8 +58,7 @@
|
||||||
- name: Install the smartgears app
|
- name: Install the smartgears app
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
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
|
||||||
shell: cd {{ smartgears_downloads_dir }}/smartgears-distribution-* ; . /{{ item.user_home }}/.bashrc ; ./install -s tomcat'
|
|
||||||
with_items: '{{ tomcat_m_instances }}'
|
with_items: '{{ tomcat_m_instances }}'
|
||||||
when:
|
when:
|
||||||
- ( smartgears_download | changed )
|
- ( smartgears_download | changed )
|
||||||
|
@ -75,6 +67,15 @@
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
tags: [ 'smartgears', 'tomcat' ]
|
tags: [ 'smartgears', 'tomcat' ]
|
||||||
|
|
||||||
|
- name: Get the real smartgears version from the exploded distribution filename
|
||||||
|
shell: /bin/ls -1 {{ smartgears_downloads_dir }} | grep smartgears-distribution | grep -v tar.gz | sed -e 's/smartgears-distribution-//g'
|
||||||
|
register: smartgears_real_version
|
||||||
|
tags: [ 'smartgears', 'tomcat' ]
|
||||||
|
|
||||||
|
- name: Set the real smartgears distribution version
|
||||||
|
set_fact: smartgears_real_distribution_version="{{ smartgears_real_version.stdout }}"
|
||||||
|
tags: [ 'smartgears', 'tomcat' ]
|
||||||
|
|
||||||
- name: Create the directory where we put the smartgears configuration snippets
|
- name: Create the directory where we put the smartgears configuration snippets
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ smartgears_user }}'
|
become_user: '{{ smartgears_user }}'
|
||||||
|
|
|
@ -26,7 +26,11 @@
|
||||||
<authorizeChildrenContext>{{ smartgears_authorized_on_all_scopes }}</authorizeChildrenContext>
|
<authorizeChildrenContext>{{ smartgears_authorized_on_all_scopes }}</authorizeChildrenContext>
|
||||||
|
|
||||||
<property name='SmartGearsDistributionBundle' value='UnBundled' />
|
<property name='SmartGearsDistributionBundle' value='UnBundled' />
|
||||||
|
{% if smartgears_distribution_version == 'latest' %}
|
||||||
|
<property name='SmartGearsDistribution' value='{{ smartgears_real_distribution_version }}' />
|
||||||
|
{% else %}
|
||||||
<property name='SmartGearsDistribution' value='{{ smartgears_distribution_version }}' />
|
<property name='SmartGearsDistribution' value='{{ smartgears_distribution_version }}' />
|
||||||
|
{% endif %}
|
||||||
<publication-frequency>{{ smartgears_publication_frequency }}</publication-frequency>
|
<publication-frequency>{{ smartgears_publication_frequency }}</publication-frequency>
|
||||||
<infrastructure>{{ smartgears_infrastructure_name }}</infrastructure>
|
<infrastructure>{{ smartgears_infrastructure_name }}</infrastructure>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue