diff --git a/roles/use-buildset-registry/tasks/user-config.yaml b/roles/use-buildset-registry/tasks/user-config.yaml index 238262fd5..b4c9eea61 100644 --- a/roles/use-buildset-registry/tasks/user-config.yaml +++ b/roles/use-buildset-registry/tasks/user-config.yaml @@ -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