Ensure docker ipv6 is enabled

master
Kuba Orlik 13 hours ago
parent 2e36d75bb6
commit 4835f1b2b2

@ -1,10 +1,14 @@
```yml
- role: "mailcow"
- name: "Install Mailcow"
hosts: ansible1
tags: "mailcow"
vars:
mailcow_repo_dir: "/opt/mailcow-dockerized"
mailcow_dockerized_commit: "586b3a2ed1c"
mailcow_hostname_fqdn: "mail.strona-czynna.pl"
mailcow_storage_dir: "/mnt/juice/mailcow"
mailcow_local_http_port: "9001"
mailcow_timezone: "Europe/Warsaw"
mailcow_repo_dir: "/opt/mailcow-dockerized"
mailcow_dockerized_commit: "586b3a2ed1c"
mailcow_hostname_fqdn: "mail.kuba-orlik.name"
mailcow_storage_dir: "/mnt/juice/mailcow"
mailcow_local_http_port: "9001"
mailcow_timezone: "Europe/Warsaw"
roles:
- mailcow
```

@ -53,6 +53,29 @@
version: "{{ mailcow_dockerized_commit }}"
update: false
- name: Read Docker daemon configuration
ansible.builtin.slurp:
src: /etc/docker/daemon.json
register: docker_daemon_json
failed_when: false
changed_when: false
- name: Enable Docker IPv6
ansible.builtin.copy:
dest: /etc/docker/daemon.json
content: >-
{{
(
(docker_daemon_json.content | default('e30=') | b64decode | from_json)
| combine({'ipv6': true})
)
| to_nice_json
}}
owner: root
group: root
mode: "0644"
notify: Restart Docker
- name: "Generate the config file"
shell:
cmd: "MAILCOW_HOSTNAME={{mailcow_hostname_fqdn}} MAILCOW_BRANCH=master MAILCOW_TZ={{mailcow_timezone}} ./generate_config.sh"

Loading…
Cancel
Save