prepare for ipv6 deployment
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
{% macro default_network(subnet_index) %}
|
||||
default:
|
||||
enable_ipv6: true
|
||||
ipam:
|
||||
config:
|
||||
- subnet: {{ docker_ipv6_subnet | ansible.utils.ipsubnet(80, subnet_index) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro traefik_labels(host, service="", port="", auth=false) %}
|
||||
traefik.enable=true
|
||||
- traefik.http.routers.{{ host }}.rule=Host(`{{ host }}.{{ domain }}`)
|
||||
|
@@ -28,8 +28,12 @@
|
||||
when: item.state == "file"
|
||||
|
||||
- name: Deploy docker-compose for {{ current_svc_name }}
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ current_svc_path }}"
|
||||
state: present
|
||||
pull: true
|
||||
remove_orphans: true
|
||||
command: docker compose -f "{{ current_svc_path }}/docker-compose.yml" up -d --pull --remove-orphans
|
||||
register: docker_compose_output
|
||||
# Not perfect idempotency, but the built-in docker_compose module doesn't support docker-compose v2
|
||||
# And of course there's an IPv6 bug in docker-compose v1, smh
|
||||
# https://github.com/docker/compose/issues/7670
|
||||
changed_when: "'created' in docker_compose_output.stderr.lower()"
|
||||
|
||||
- debug:
|
||||
var: docker_compose_output
|
||||
|
Reference in New Issue
Block a user