Merge pull request #743 from pushytoxin/docker_network
Drop the old workaround for an Ansible bug that has been fixed three years ago
This commit is contained in:
commit
8710883064
@ -19,31 +19,10 @@
|
|||||||
mode: '0660'
|
mode: '0660'
|
||||||
when: "matrix_vars_yml_snapshotting_enabled|bool"
|
when: "matrix_vars_yml_snapshotting_enabled|bool"
|
||||||
|
|
||||||
# `docker_network` doesn't work as expected when the given network
|
- name: Ensure Matrix network is created in Docker
|
||||||
# is a substring of a network that already exists.
|
docker_network:
|
||||||
#
|
name: "{{ matrix_docker_network }}"
|
||||||
# See:
|
driver: bridge
|
||||||
# - 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-remove-all script created
|
- name: Ensure matrix-remove-all script created
|
||||||
template:
|
template:
|
||||||
|
@ -59,22 +59,11 @@
|
|||||||
mode: 0644
|
mode: 0644
|
||||||
when: matrix_coturn_enabled|bool
|
when: matrix_coturn_enabled|bool
|
||||||
|
|
||||||
# `docker_network` doesn't work as expected when the given network
|
- name: Ensure Coturn network is created in Docker
|
||||||
# is a substring of a network that already exists.
|
docker_network:
|
||||||
#
|
name: "{{ matrix_coturn_docker_network }}"
|
||||||
# See our other comments in `roles/matrix-base/tasks/setup_matrix_base.yml`
|
driver: bridge
|
||||||
- name: Check existence of Coturn network in Docker
|
|
||||||
shell:
|
|
||||||
cmd: "docker network ls -q --filter='name=^{{ matrix_coturn_docker_network }}$'"
|
|
||||||
register: matrix_coturn_result_docker_network
|
|
||||||
changed_when: false
|
|
||||||
when: matrix_coturn_enabled|bool
|
when: matrix_coturn_enabled|bool
|
||||||
check_mode: no
|
|
||||||
|
|
||||||
- name: Create Coturn network in Docker
|
|
||||||
shell:
|
|
||||||
cmd: "docker network create --driver=bridge {{ matrix_coturn_docker_network }}"
|
|
||||||
when: "matrix_coturn_enabled|bool and matrix_coturn_result_docker_network.stdout == '' and not ansible_check_mode"
|
|
||||||
|
|
||||||
- name: Ensure matrix-coturn.service installed
|
- name: Ensure matrix-coturn.service installed
|
||||||
template:
|
template:
|
||||||
|
Loading…
Reference in New Issue
Block a user