docker: Add docker_systemd_reload functionality

Change-Id: I8cca0cc46212ce92c474ebf67fd0835375d5d541
This commit is contained in:
Michal Nasiadka 2023-01-20 16:30:36 +01:00
parent 25e01de1a5
commit 131df5e480
3 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds ``docker_systemd_reload`` variable (defaults to ``false``),
that changes restart task behaviour to reload docker instead
when set to ``true``.

View File

@ -51,3 +51,6 @@ docker_registry_ca:
# Whether to configure Docker and containerd for Zun.
docker_configure_for_zun: false
containerd_configure_for_zun: "{{ docker_configure_for_zun | bool }}"
# Whether to restart docker systemd unit or reload
docker_systemd_reload: false

View File

@ -10,7 +10,7 @@
- name: Restart docker
systemd:
name: docker
state: restarted
state: "{{ 'reloaded' if docker_systemd_reload | bool else 'restarted' }}"
masked: no
become: True