Merge "tripleo_container_rm: also remove systemd requires when they exist"

This commit is contained in:
Zuul 2020-02-21 16:24:56 +00:00 committed by Gerrit Code Review
commit 056bd802bc
1 changed files with 13 additions and 1 deletions

View File

@ -60,9 +60,21 @@
path: "/etc/systemd/system/tripleo_{{ container }}.service"
state: absent
- name: "check if {{ container }} service requires exists in systemd"
stat:
path: "/etc/systemd/system/tripleo_{{ container }}.service.requires"
register: systemd_requires_exists
- name: "remove {{ container }} systemd requires"
file:
path: "/etc/systemd/system/tripleo_{{ container }}.service.requires"
state: absent
when:
- systemd_requires_exists.stat.exists
- name: Reload systemd services if needed
when:
- systemd_healthcheck_exists.stat.exists or systemd_exists.stat.exists
- systemd_healthcheck_exists.stat.exists or systemd_exists.stat.exists or systemd_requires_exists.stat.exists
systemd:
daemon_reload: true