Fix idempotency problem when getting rid of S3 setup
This commit is contained in:
parent
ac59192696
commit
f6be25a6ae
@ -25,16 +25,21 @@
|
|||||||
#
|
#
|
||||||
# Tasks related to getting rid of s3fs (if it was previously enabled)
|
# Tasks related to getting rid of s3fs (if it was previously enabled)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
- name: Check existance of matrix-s3fs service
|
||||||
|
stat: path="/etc/systemd/system/matrix-s3fs.service"
|
||||||
|
register: matrix_s3fs_service_stat
|
||||||
|
|
||||||
- name: Ensure matrix-s3fs is stopped
|
- name: Ensure matrix-s3fs is stopped
|
||||||
service: name=matrix-s3fs state=stopped daemon_reload=yes
|
service: name=matrix-s3fs state=stopped daemon_reload=yes
|
||||||
register: stopping_result
|
register: stopping_result
|
||||||
when: "not matrix_s3_media_store_enabled"
|
when: "not matrix_s3_media_store_enabled and matrix_s3fs_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure matrix-s3fs.service doesn't exist
|
- name: Ensure matrix-s3fs.service doesn't exist
|
||||||
file:
|
file:
|
||||||
path: "{{ matrix_base_data_path }}/s3fs-credentials"
|
path: "/etc/systemd/system/matrix-s3fs.service"
|
||||||
state: absent
|
state: absent
|
||||||
when: "not matrix_s3_media_store_enabled"
|
when: "not matrix_s3_media_store_enabled and matrix_s3fs_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure s3fs-credentials doesn't exist
|
- name: Ensure s3fs-credentials doesn't exist
|
||||||
file:
|
file:
|
||||||
|
Loading…
Reference in New Issue
Block a user