From 5927ed56b0d4ef12d36bbce42ebbac76c96755e1 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 3 Apr 2020 13:55:23 +0300 Subject: [PATCH] Fix matrix_ma1sd_service_stat.stat.exists sometimes being undefined --- roles/matrix-ma1sd/tasks/migrate_mxisd.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/roles/matrix-ma1sd/tasks/migrate_mxisd.yml b/roles/matrix-ma1sd/tasks/migrate_mxisd.yml index 0331f7b97..1d9662042 100644 --- a/roles/matrix-ma1sd/tasks/migrate_mxisd.yml +++ b/roles/matrix-ma1sd/tasks/migrate_mxisd.yml @@ -18,14 +18,13 @@ stat: path: "{{ matrix_systemd_path }}/matrix-mxisd.service" register: matrix_mxisd_service_stat - when: "ma1sd_migrate_mxisd_data_dir_stat.stat.exists" - name: Ensure matrix-mxisd is stopped service: name: matrix-mxisd state: stopped 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 stat: @@ -63,11 +62,11 @@ file: path: "{{ matrix_systemd_path }}/matrix-mxisd.service" 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 service: daemon_reload: yes - when: "matrix_ma1sd_service_stat.stat.exists" + when: "matrix_mxisd_service_stat.stat.exists"