- name: Set mirror_fqdn fact when: - mirror_fqdn is not defined - zuul_site_mirror_fqdn is defined set_fact: mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" - name: Set up docker mirrors include: mirror.yaml when: mirror_fqdn is defined static: no - name: Install docker-ce from upstream include: upstream.yaml when: use_upstream_docker - name: Install docker from distro include_tasks: "{{ lookup('first_found', params) }}" vars: params: files: - "{{ ansible_distribution }}.{{ ansible_architecture }}.yaml" - "{{ ansible_distribution }}.yaml" - "{{ ansible_os_family }}.yaml" - "default.yaml" paths: - distros when: not use_upstream_docker - name: Add user to docker group become: yes user: name: "{{ ansible_user }}" groups: - docker append: yes - name: reset ssh connection to pick up docker group meta: reset_connection