smartgears: do not stop the service if it's the first installation.

This commit is contained in:
Andrea Dell'Amico 2017-09-29 18:06:45 +02:00
parent 3eb0e0a126
commit 945c5a61ca
1 changed files with 11 additions and 1 deletions

View File

@ -33,11 +33,21 @@
- ( smartgears_download | changed )
tags: [ 'smartgears', 'tomcat' ]
- name: Check if the smartgears stop script exists
become: True
become_user: '{{ smartgears_user }}'
stat: path=/home/{{ smartgears_user }}/stopContainer.sh
when: smartgears_upgrade or ( smartgears_download | changed )
register: smartgears_stop_script
tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ]
- name: Stop the smartgears container before launching the upgrade script
become: True
become_user: '{{ smartgears_user }}'
shell: /home/{{ smartgears_user }}/stopContainer.sh
when: smartgears_upgrade or ( smartgears_download | changed )
when:
- smartgears_upgrade or ( smartgears_download | changed )
- smartgears_stop_script.exists
tags: [ 'smartgears', 'tomcat', 'stop_smartgears_service' ]
- name: Install the additional tomcat default file