From 466a18204652f9e1849665937f5d1dd7bcd6c4f4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 24 Jul 2019 01:20:03 +0300 Subject: [PATCH] Fix(remove-systemd): Fix reboot condition `purged.rc` is be undefined is SystemD has already been removed. --- playbooks/debian/roles/remove-systemd/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/debian/roles/remove-systemd/tasks/main.yml b/playbooks/debian/roles/remove-systemd/tasks/main.yml index 144a05d..9c31cef 100644 --- a/playbooks/debian/roles/remove-systemd/tasks/main.yml +++ b/playbooks/debian/roles/remove-systemd/tasks/main.yml @@ -35,8 +35,8 @@ - name: Reboot if SystemD is still active become: true reboot: - when: purged.rc != 0 + when: "'rc' in purged and purged.rc != 0" - name: Purge SystemD after reboot import_tasks: remove-systemd.yml - when: purged.rc != 0 + when: "'rc' in purged and purged.rc != 0" -- 2.39.5