Add retry to container start/stop handlers
Adding a retry to the container start/stop handlers will allow a restart to be attempted more than once in the event the system isn't ready for some reason. Change-Id: Ie1dabf9a3b513b732025201ad3b0af593c4832dd Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
b506027b73
commit
28f3a79440
@ -24,6 +24,9 @@
|
||||
notify:
|
||||
- Start Container
|
||||
delegate_to: "{{ physical_host }}"
|
||||
register: container_stop
|
||||
until: container_stop | success
|
||||
retries: 3
|
||||
when: lxc_container_allow_restarts | bool
|
||||
|
||||
# Due to https://github.com/ansible/ansible-modules-extras/issues/2691
|
||||
@ -35,3 +38,6 @@
|
||||
--logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log
|
||||
--logpriority {{ (debug | bool) | ternary('DEBUG', 'INFO') }}
|
||||
delegate_to: "{{ physical_host }}"
|
||||
register: container_start
|
||||
until: container_start | success
|
||||
retries: 3
|
||||
|
Loading…
x
Reference in New Issue
Block a user