From: Oleg Broytman Date: Tue, 23 Jul 2019 22:20:03 +0000 (+0300) Subject: Fix(remove-systemd): Fix reboot condition X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=466a18204652f9e1849665937f5d1dd7bcd6c4f4;hp=edf447b86f291118443987ab67de35b99e9b2d38;p=ansible.git Fix(remove-systemd): Fix reboot condition `purged.rc` is be undefined is SystemD has already been removed. --- 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"