Fix matrix_ma1sd_service_stat.stat.exists sometimes being undefined
This commit is contained in:
parent
c3efd2966f
commit
5927ed56b0
|
@ -18,14 +18,13 @@
|
||||||
stat:
|
stat:
|
||||||
path: "{{ matrix_systemd_path }}/matrix-mxisd.service"
|
path: "{{ matrix_systemd_path }}/matrix-mxisd.service"
|
||||||
register: matrix_mxisd_service_stat
|
register: matrix_mxisd_service_stat
|
||||||
when: "ma1sd_migrate_mxisd_data_dir_stat.stat.exists"
|
|
||||||
|
|
||||||
- name: Ensure matrix-mxisd is stopped
|
- name: Ensure matrix-mxisd is stopped
|
||||||
service:
|
service:
|
||||||
name: matrix-mxisd
|
name: matrix-mxisd
|
||||||
state: stopped
|
state: stopped
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when: "ma1sd_migrate_mxisd_data_dir_stat.stat.exists and matrix_mxisd_service_stat.stat.exists"
|
when: "matrix_mxisd_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Check existence of matrix-ma1sd service
|
- name: Check existence of matrix-ma1sd service
|
||||||
stat:
|
stat:
|
||||||
|
@ -63,11 +62,11 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ matrix_systemd_path }}/matrix-mxisd.service"
|
path: "{{ matrix_systemd_path }}/matrix-mxisd.service"
|
||||||
state: absent
|
state: absent
|
||||||
when: "matrix_ma1sd_service_stat.stat.exists"
|
when: "matrix_mxisd_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after removing outdated matrix-mxisd.service
|
- name: Ensure systemd reloaded after removing outdated matrix-mxisd.service
|
||||||
service:
|
service:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when: "matrix_ma1sd_service_stat.stat.exists"
|
when: "matrix_mxisd_service_stat.stat.exists"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue