From 3dee651b447b20157e52bfbfd7312b4c73b1be09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 11 Jan 2022 17:09:18 +0100 Subject: roles/workstation: Setup docker daemon configuration --- roles/workstation/tasks/dockerd.yml | 7 +++++++ roles/workstation/tasks/os_archlinux.yml | 3 +++ roles/workstation/templates/docker-daemon.json.j2 | 8 ++++++++ 3 files changed, 18 insertions(+) create mode 100644 roles/workstation/tasks/dockerd.yml create mode 100644 roles/workstation/templates/docker-daemon.json.j2 (limited to 'roles/workstation') diff --git a/roles/workstation/tasks/dockerd.yml b/roles/workstation/tasks/dockerd.yml new file mode 100644 index 0000000..f3ace56 --- /dev/null +++ b/roles/workstation/tasks/dockerd.yml @@ -0,0 +1,7 @@ +- name: configure default network for docker containers + template: + src: docker-daemon.json.j2 + dest: /etc/docker/daemon.json + owner: 0 + group: 0 + mode: 0600 diff --git a/roles/workstation/tasks/os_archlinux.yml b/roles/workstation/tasks/os_archlinux.yml index 7186585..912d938 100644 --- a/roles/workstation/tasks/os_archlinux.yml +++ b/roles/workstation/tasks/os_archlinux.yml @@ -37,6 +37,9 @@ - name: include virtualization setup include_tasks: libvirt.yml +- name: include dockerd setup + include_tasks: dockerd.yml + - name: retrieve installed packages package_facts: register: package_facts diff --git a/roles/workstation/templates/docker-daemon.json.j2 b/roles/workstation/templates/docker-daemon.json.j2 new file mode 100644 index 0000000..2952d24 --- /dev/null +++ b/roles/workstation/templates/docker-daemon.json.j2 @@ -0,0 +1,8 @@ +{ + "default-address-pools" : [ + { + "base" : "172.240.0.0/16", + "size" : 24 + } + ] +} -- cgit v1.2.3