summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-08-29 10:13:15 -0400
committerGitHub <noreply@github.com>2017-08-29 10:13:15 -0400
commit5e32de3e8e9b302dbc9f4ba26985380197ac4171 (patch)
treeb4c74790895dab78bcd3f2f2865032010a15f338 /roles/openshift_node/tasks
parent4338dce09dbe5497f2a3700992eb4c5afeb4e6f6 (diff)
parent5815311c8fbad15fe23691e010ce7e4a132f6e7c (diff)
downloadopenshift-5e32de3e8e9b302dbc9f4ba26985380197ac4171.tar.gz
openshift-5e32de3e8e9b302dbc9f4ba26985380197ac4171.tar.bz2
openshift-5e32de3e8e9b302dbc9f4ba26985380197ac4171.tar.xz
openshift-5e32de3e8e9b302dbc9f4ba26985380197ac4171.zip
Merge pull request #5128 from mgugino-upstream-stage/reg-auth
Add independent registry auth support
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r--roles/openshift_node/tasks/main.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index da16e7592..525dd1d1a 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -150,6 +150,21 @@
notify:
- restart node
+- name: Check for credentials file for registry auth
+ stat:
+ path: "{{oreg_auth_credentials_path }}"
+ when:
+ - oreg_auth_user is defined
+ register: node_oreg_auth_credentials_stat
+
+- name: Create credentials for registry auth
+ command: "docker --config={{ oreg_auth_credentials_path }} login -u {{ oreg_auth_user }} -p {{ oreg_auth_password }} {{ oreg_host }}"
+ when:
+ - oreg_auth_user is defined
+ - (not node_oreg_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool
+ notify:
+ - restart node
+
- name: Configure AWS Cloud Provider Settings
lineinfile:
dest: /etc/sysconfig/{{ openshift.common.service_type }}-node