use-buildset-registry: protect against /var/user/1000 not existing
This is the case on Xenial; we'll just accept that podman and friends may not work there. Change-Id: Icd14e4502ff21640a1948671a475448adaf868f5
This commit is contained in:
parent
a68ddd3c5f
commit
b4dc66ec33
@ -37,10 +37,18 @@
|
||||
content: "{{ docker_config | to_nice_json }}"
|
||||
dest: "~/.docker/config.json"
|
||||
mode: 0600
|
||||
# The next two tasks are for supporting the "containers" tools (ie,
|
||||
# not docker); this directory doesn't exist on Xenial.
|
||||
- name: Check if /run/user exists
|
||||
stat:
|
||||
path: "/run/user/{{ ansible_user_uid }}"
|
||||
register: run_user
|
||||
- name: Write containers auth configuration
|
||||
when: run_user.stat.exists
|
||||
copy:
|
||||
content: "{{ docker_config | to_nice_json }}"
|
||||
dest: "/run/user/{{ ansible_user_uid }}/auth.json"
|
||||
# The next two tasks are for supporting k8s
|
||||
- name: Check if /var/lib/kubelet exists
|
||||
stat:
|
||||
path: /var/lib/kubelet
|
||||
|
Loading…
Reference in New Issue
Block a user