1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2024-12-12 08:43:55 +02:00

Revert "Work around buggy docker_network sometimes failing to work"

The docker_network bug was fixed two years ago
This reverts commit 36658addcd.
This commit is contained in:
Béla Becker 2020-08-02 20:54:13 +02:00
parent a5ae7e9ef0
commit 6921ec4b8a

View File

@ -19,31 +19,10 @@
mode: '0660'
when: "matrix_vars_yml_snapshotting_enabled|bool"
# `docker_network` doesn't work as expected when the given network
# is a substring of a network that already exists.
#
# See:
# - https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/12
# - https://github.com/ansible/ansible/issues/32926
#
# Due to that, we employ a workaround below.
#
# - name: Ensure Matrix network is created in Docker
# docker_network:
# name: "{{ matrix_docker_network }}"
# driver: bridge
- name: Check existence of Matrix network in Docker
shell:
cmd: "docker network ls -q --filter='name=^{{ matrix_docker_network }}$'"
register: result_check_docker_network
changed_when: false
check_mode: no
- name: Create Matrix network in Docker
shell:
cmd: "docker network create --driver=bridge {{ matrix_docker_network }}"
when: "result_check_docker_network.stdout == '' and not ansible_check_mode"
- name: Ensure Matrix network is created in Docker
docker_network:
name: "{{ matrix_docker_network }}"
driver: bridge
- name: Ensure matrix-remove-all script created
template: