diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index a432b4f8..dc81de1d 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -47,7 +47,7 @@ shell: /home/{{ smartgears_user }}/stopContainer.sh when: - smartgears_upgrade or ( smartgears_download | changed ) - - smartgears_stop_script.exists + - smartgears_stop_script.stat.exists tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ] - name: Install the additional tomcat default file @@ -68,7 +68,7 @@ - name: Install the smartgears app become: True 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 }}' when: - ( smartgears_download | changed ) @@ -122,7 +122,6 @@ with_items: - '{{ smartgears_install_path }}/lib/lib' - '{{ smartgears_install_path }}/apps/webapps' - when: smartgears_upgrade tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] - name: Install the script that fetches the scope tokens @@ -152,7 +151,7 @@ become: True become_user: '{{ smartgears_user }}' 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 tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ]