Ian Wienand f07bf2a507 Import install-docker role
This is a role for installing docker on our control-plane servers.

It is based on install-docker from zuul-jobs.

Basic testinfra tests are added; because docker fiddles the iptables
rules in magic ways, the firewall testing is moved out of the base
tests and modified to partially match our base firewall configuration.

Change-Id: Ia4de5032789ff0f2b07d4f93c0c52cf94aa9c25c
2018-12-14 11:30:47 -08:00

26 lines
537 B
YAML

- name: Create docker directory
become: yes
file:
state: directory
path: /etc/docker
- name: Install docker configuration
become: yes
template:
dest: /etc/docker/daemon.json
group: root
mode: 0644
owner: root
src: daemon.json.j2
- name: Install docker-ce from upstream
include: upstream.yaml
when: use_upstream_docker
- name: Install docker-engine from distro
include: distro.yaml
when: not use_upstream_docker
- name: reset ssh connection to pick up docker group
meta: reset_connection