library/roles/smartgears/smartgears/tasks/smartgears-app.yml: Fix the check that we use to find the distribution directory.

This commit is contained in:
Andrea Dell'Amico 2017-10-02 15:20:10 +02:00
parent c8f0c88e23
commit 280ed19764
1 changed files with 3 additions and 4 deletions

View File

@ -47,7 +47,7 @@
shell: /home/{{ smartgears_user }}/stopContainer.sh shell: /home/{{ smartgears_user }}/stopContainer.sh
when: when:
- smartgears_upgrade or ( smartgears_download | changed ) - smartgears_upgrade or ( smartgears_download | changed )
- smartgears_stop_script.exists - smartgears_stop_script.stat.exists
tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ] tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ]
- name: Install the additional tomcat default file - name: Install the additional tomcat default file
@ -68,7 +68,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 shell: cd {{ smartgears_downloads_dir }} ; dest_dir=$( find . -type d -name smartgears-distribution-\* | tail -1 ) ; cd $dest_dir ; . /{{ 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 )
@ -122,7 +122,6 @@
with_items: with_items:
- '{{ smartgears_install_path }}/lib/lib' - '{{ smartgears_install_path }}/lib/lib'
- '{{ smartgears_install_path }}/apps/webapps' - '{{ smartgears_install_path }}/apps/webapps'
when: smartgears_upgrade
tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ]
- name: Install the script that fetches the scope tokens - name: Install the script that fetches the scope tokens
@ -152,7 +151,7 @@
become: True become: True
become_user: '{{ smartgears_user }}' become_user: '{{ smartgears_user }}'
shell: /usr/local/bin/get-scopes {{ gcube_admin_token | default('') }} shell: /usr/local/bin/get-scopes {{ gcube_admin_token | default('') }}
when: gcube_admin_token is defined or smartgears_upgrade when: gcube_admin_token is defined or ( smartgears_download | changed )
notify: Restart smartgears notify: Restart smartgears
tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ]