From dd74dd07ce2587c952b54a55aa4e557db6040bbf Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 7 Feb 2018 19:16:37 +0100 Subject: [PATCH] library/roles/smartgears/smartgears/tasks/smartgears-app.yml: Fix another bit of the smartgears playbook. See https://support.d4science.org/issues/11095 --- .../smartgears/tasks/smartgears-app.yml | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index 02cb1afc..b6656d16 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -132,8 +132,14 @@ - name: Print the smartgears version debug: msg: "The smartgears version is: {{ smartgears_real_version.stdout }}" + when: smartgears_real_version is defined tags: [ 'smartgears', 'smartgears_distribution', 'tomcat', 'smartgears_conf' ] +# - name: Create a file with the +# copy: content={{ smartgears_real_version.stdout }} dest={{ smartgears_user_home }}/SMARTGEARS_VERSION owner=root group={{ smartgears_user }} mode=0444 force=yes +# when: smartgears_real_version is defined +# tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ] + # - name: Check if we have a smartgears version file # stat: path={{ smartgears_user_home }}/SMARTGEARS_VERSION # register: sm_version_file @@ -174,16 +180,18 @@ become_user: '{{ smartgears_user }}' shell: /usr/local/bin/get-scopes {{ gcube_admin_token | default('') }} when: gcube_admin_token is defined or ( smartgears_download | changed ) +# register: smartgears_remove_state notify: Restart smartgears tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ] -- name: Remove the smartgears application state if requested - become: True - become_user: '{{ smartgears_user }}' - shell: . {{ smartgears_user_home }}/.bashrc ; cd {{ smartgears_user_home }}/SmartGears/scripts ; ./clean-container-state -s old_saved_scopes.xml - when: smartgears_remove_state and not smartgears_upgrade - notify: Restart smartgears - tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ] +# Don't needed anymore. The get-scopes script takes care of everything +# - name: Remove the smartgears application state if requested +# become: True +# become_user: '{{ smartgears_user }}' +# shell: . {{ smartgears_user_home }}/.bashrc ; cd {{ smartgears_user_home }}/SmartGears/scripts ; ./clean-container-state -s old_saved_scopes.xml +# when: ( smartgears_remove_state | changed ) +# notify: Restart smartgears +# tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ] - name: Force a smartgears restart service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted