summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-09-13 17:15:39 -0400
committerGitHub <noreply@github.com>2017-09-13 17:15:39 -0400
commita0086cbeefc583ec624ae7b00548cd6f3cfbfadf (patch)
tree625571856345872ae16bcf861ac9465e712a2647 /roles/docker/tasks
parent581d5d2dd18688bcf70722d6126730691cdd82fa (diff)
parentdb30a2eb386930e0b20c8106e334d605e2ae770a (diff)
downloadopenshift-a0086cbeefc583ec624ae7b00548cd6f3cfbfadf.tar.gz
openshift-a0086cbeefc583ec624ae7b00548cd6f3cfbfadf.tar.bz2
openshift-a0086cbeefc583ec624ae7b00548cd6f3cfbfadf.tar.xz
openshift-a0086cbeefc583ec624ae7b00548cd6f3cfbfadf.zip
Merge pull request #5359 from mgugino-upstream-stage/version-docker-auth-config
Merged by openshift-bot
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r--roles/docker/tasks/package_docker.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/docker/tasks/package_docker.yml b/roles/docker/tasks/package_docker.yml
index bc52ab60c..145b552a6 100644
--- a/roles/docker/tasks/package_docker.yml
+++ b/roles/docker/tasks/package_docker.yml
@@ -117,6 +117,18 @@
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