forked from ISTI-ansible-roles/ansible-roles
Introduce the new variable smartgears_force_remove_state and a task that removes the local state.
This commit is contained in:
parent
5a6206d79d
commit
1f3564b491
|
@ -5,7 +5,7 @@ smartgears_gcube_repository: '{{ gcube_repository }}'
|
|||
# distribution version
|
||||
smartgears_upgrade: False
|
||||
smartgears_force_install: False
|
||||
smartgears_remove_state: False
|
||||
smartgears_force_remove_state: False
|
||||
|
||||
smartgears_node: True
|
||||
smartgears_install_generic_virthost: True
|
||||
|
|
|
@ -166,19 +166,16 @@
|
|||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
shell: /usr/local/bin/get-scopes {{ gcube_admin_token | default('') }}
|
||||
# when: gcube_admin_token is defined or ( smartgears_download is changed )
|
||||
# register: smartgears_remove_state
|
||||
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 is changed
|
||||
# notify: Restart smartgears
|
||||
# tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
|
||||
- name: Remove the smartgears application state if requested
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
file: dest={{ smartgears_install_path }}/state state=absent
|
||||
when: smartgears_force_remove_state
|
||||
notify: Restart smartgears
|
||||
tags: [ 'smartgears', 'smartgears_distribution', 'smartgears_conf', 'tomcat' ]
|
||||
|
||||
- name: Force a smartgears restart
|
||||
service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted
|
||||
|
|
Loading…
Reference in New Issue