diff --git a/defaults/main.yml b/defaults/main.yml index efe7d5a..a872596 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,3 +2,26 @@ # adivinar nombre de release debian, por defecto usar buster docker_target_release: "{{ ansible_distribution_release if \ ansible_distribution_release|default('NA') != 'NA' else 'buster' }}" + +# configuracion de docker +docker_config: + + # red bridge (por defecto) + bip: 172.17.0.1/16 + + # otras redes (https://github.com/moby/moby/pull/29376) + default-address-pools: + # scope local: usar 172.20.subnet.host + - scope: local + base: 172.20.0.0/16 + size: 24 + + # scope local: usar 192.168.subnet.host + - scope: local + base: 192.168.0.0/16 + size: 24 + + # scope global: usar 10.sub.net.host + - scope: global + base: 10.0.0.0/8 + size: 24 diff --git a/tasks/main.yml b/tasks/main.yml index 17604d8..9f4958f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -79,3 +79,10 @@ sha256sum: 2bdab0bbf42583b4b77ee015cf908933c78f0572a7cb949a7dd8e200e6250221 dest: /usr/local/bin/docker-compose mode: +x + +- name: Configuración de Docker + copy: + content: | + {{ docker_config | to_nice_json }} + dest: /etc/docker/daemon.json + notify: restart docker