Ansible triggers notifies at the same time. It created a race as "wait
for registry" is dependant on "reload docker-distribution". This patch
moves notifies to dependant service to fix race condition.
Change-Id: I550d5538238ba6100714dd1ca8fcda25292a6773
Some of our tasks and handlers need to be run as root but were
previously missing the become: true option. This change addresses this
to ensure the appropriate tasks and handlers are run as an admin user.
Change-Id: I9cf00809e8725d9220bc993c8fd6602e19ed7aa3
This commit adds an option `container_registry_skip_reconfiguration`,
that, when enabled, disables the reconfiguration if docker has already
been configured once.
Change-Id: I0bcaeea9cd24ab35a81d8c3d6fc3a384c1e4c3c2
Related-Bug: #1804790
Move the wait-for-registry-up loop and systemd daemon reloading
commands behind the user-faced "restart docker(-registry)"
handlers. So users may just refer to it w/o manual daemon reload
tasks and w/o knowing of other advanced sub-steps details. But
those handlers may still be notified directly as well.
Add a fixed delay of a 10s for the docker service reload handler,
which is nice to have for the loaded systems running that command
way too long.
Add wait-for-docker-service-up loop into the docker service
reload handler for the better failures detection.
Simplify future support on CoreOS/atomic distributions
(which require reloading docker and socket in particular order)
Based on
https://github.com/kubernetes-incubator/kubespray/blob/ \
810596c6d8f1e13afa934ddeef996d4f42b29890/roles/docker/handlers/main.yml
Depends-On: I26cc07aa05912c3e84d59003686eae210e924a16
Change-Id: I28e8c682005e77b87a347f4d2a2dff219fab488c
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
- add prefix to role variable names to avoid name collisions
- use ini_file rather than blockinfile for setting mount flags
- use ansible_selinux fact rather than depending on variable in role
- use role variables for setting values to be used in tasks rather than in line conditionals
- use filters for creating JSON file rather than a template
- remove '---' from YAML files since Ansible does not user YAML front matter
- update meta/main.yml