Explorar o código

Run registry auth after docker restart

Currently, docker login may fail if a proxy is added to the config
but docker is already running.

This is due to the fact that 'docker login' must have a functioning
docker.service running (with valid network connection) to complete.

Currently, handlers restart the docker service at the end of
the role.  This doesn't allow for updating proxy settings before
running docker login.

This commit moves 'docker login' command after flushing handlers.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1511869
Michael Gugino %!s(int64=7) %!d(string=hai) anos
pai
achega
68b66faed0
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      roles/docker/tasks/package_docker.yml

+ 3 - 2
roles/docker/tasks/package_docker.yml

@@ -154,6 +154,7 @@
 - set_fact:
     docker_service_status_changed: "{{ (r_docker_package_docker_start_result | changed) and (r_docker_already_running_result.stdout != 'ActiveState=active' ) }}"
 
-- include: registry_auth.yml
-
 - meta: flush_handlers
+
+# This needs to run after docker is restarted to account for proxy settings.
+- include: registry_auth.yml