瀏覽代碼

Merge pull request #5647 from mgugino-upstream-stage/docker-reg-auth-after-start

Automatic merge from submit-queue.

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
OpenShift Merge Robot 7 年之前
父節點
當前提交
ceac038204
共有 1 個文件被更改,包括 12 次插入12 次删除
  1. 12 12
      roles/docker/tasks/package_docker.yml

+ 12 - 12
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