diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-10-03 15:20:45 -0400 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-10-03 15:20:45 -0400 |
commit | 9bd849c32d87c8e92b9808087e7017934449ef64 (patch) | |
tree | 05136aa9886e90d8565b8cfef71843431683c8f9 /roles/docker/tasks | |
parent | 85dd3c223eff93d3c82da1487c8926f3632c670e (diff) | |
download | openshift-9bd849c32d87c8e92b9808087e7017934449ef64.tar.gz openshift-9bd849c32d87c8e92b9808087e7017934449ef64.tar.bz2 openshift-9bd849c32d87c8e92b9808087e7017934449ef64.tar.xz openshift-9bd849c32d87c8e92b9808087e7017934449ef64.zip |
Ensure docker service started prior to credentials
Currently, authenticated registry credentials
are requested before docker might be started in
the docker role.
This commit moves the relevant registry credential
tasks to after docker is started.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1316341
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r-- | roles/docker/tasks/package_docker.yml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml index a35335937..eab5c3bb1 100644 --- a/roles/docker/tasks/package_docker.yml +++ b/roles/docker/tasks/package_docker.yml @@ -137,18 +137,6 @@ notify: - restart docker -- name: Check for credentials file for registry auth - stat: - path: "{{ docker_cli_auth_config_path }}/config.json" - when: oreg_auth_user is defined - register: docker_cli_auth_credentials_stat - -- name: Create credentials for docker cli registry auth - command: "docker --config={{ docker_cli_auth_config_path }} login -u {{ oreg_auth_user }} -p {{ oreg_auth_password }} {{ oreg_host }}" - when: - - oreg_auth_user is defined - - (not docker_cli_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool - - name: Start the Docker service systemd: name: docker @@ -163,4 +151,16 @@ - set_fact: docker_service_status_changed: "{{ r_docker_package_docker_start_result | changed }}" +- name: Check for credentials file for registry auth + stat: + path: "{{ docker_cli_auth_config_path }}/config.json" + when: oreg_auth_user is defined + register: docker_cli_auth_credentials_stat + +- name: Create credentials for docker cli registry auth + command: "docker --config={{ docker_cli_auth_config_path }} login -u {{ oreg_auth_user }} -p {{ oreg_auth_password }} {{ oreg_host }}" + when: + - oreg_auth_user is defined + - (not docker_cli_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool + - meta: flush_handlers |