tripleo_container_manage: skip shutdown.yml if not necessary
If the tripleo-container-shutdown.preset is already in place, we don't need to execute the shutdown.yml playbook. It'll avoid the repeat of these tasks at every step; and therefore save time. Change-Id: I0796695271ec7863bb23e5bc292876e1e845e0fe
This commit is contained in:
parent
00dcda3d49
commit
e37bdf1793
|
@ -83,8 +83,14 @@
|
|||
when:
|
||||
- tripleo_container_manage_systemd_order
|
||||
block:
|
||||
- name: Check if /usr/lib/systemd/system-preset/91-tripleo-container-shutdown.preset exists
|
||||
stat:
|
||||
path: /usr/lib/systemd/system-preset/91-tripleo-container-shutdown.preset
|
||||
register: tripleo_container_shutdown
|
||||
- name: Include tasks for systemd shutdown service
|
||||
include_tasks: shutdown.yml
|
||||
when:
|
||||
- not tripleo_container_shutdown.stat.exists
|
||||
|
||||
- name: "Manage containers from {{ tripleo_container_manage_config }}"
|
||||
when:
|
||||
|
|
Loading…
Reference in New Issue