Add auth config to kubelet user for buildset registries

Change-Id: I3c6b434382aab2f7ef565808954873e9aa6b9b42
This commit is contained in:
Jeff Liu 2019-07-29 15:07:27 -04:00
parent c4aae4ffa5
commit 2c33db2674

View File

@ -41,3 +41,14 @@
content: "{{ docker_config | to_nice_json }}"
dest: "~/.docker/config.json"
mode: 0600
- name: Check if /var/lib/kubelet exists
stat:
path: /var/lib/kubelet
register: kubelet_config
- name: Create symbolic link between user and var/lib/kubelet configs
when: kubelet_config.stat.exists
become: yes
file:
src: "~{{ buildset_registry_docker_user | default(ansible_user) }}/.docker/config.json"
dest: /var/lib/kubelet/config.json
state: link