Ver a proveniência

Merge pull request #265 from gusttt/checkmode

Disable docker network tasks in check mode to allow running the playbook in check mode (--check --diff)
pull/267/head
Slavi Pantaleev há 6 anos
committed by GitHub
ascendente
cometimento
d2534e20d8
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4AEE18F83AFDEB23
2 ficheiros alterados com 4 adições e 2 eliminações
  1. +2
    -1
      roles/matrix-base/tasks/setup_matrix_base.yml
  2. +2
    -1
      roles/matrix-coturn/tasks/setup_coturn.yml

+ 2
- 1
roles/matrix-base/tasks/setup_matrix_base.yml Ver ficheiro

@@ -42,11 +42,12 @@
cmd: "docker network ls -q --filter='name=^{{ matrix_docker_network }}$'" cmd: "docker network ls -q --filter='name=^{{ matrix_docker_network }}$'"
register: result_check_docker_network register: result_check_docker_network
changed_when: false changed_when: false
check_mode: no


- name: Create Matrix network in Docker - name: Create Matrix network in Docker
shell: shell:
cmd: "docker network create --driver=bridge {{ matrix_docker_network }}" cmd: "docker network create --driver=bridge {{ matrix_docker_network }}"
when: "result_check_docker_network.stdout == ''"
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:


+ 2
- 1
roles/matrix-coturn/tasks/setup_coturn.yml Ver ficheiro

@@ -38,11 +38,12 @@
register: matrix_coturn_result_docker_network register: matrix_coturn_result_docker_network
changed_when: false changed_when: false
when: matrix_coturn_enabled|bool when: matrix_coturn_enabled|bool
check_mode: no


- name: Create Coturn network in Docker - name: Create Coturn network in Docker
shell: shell:
cmd: "docker network create --driver=bridge {{ matrix_coturn_docker_network }}" cmd: "docker network create --driver=bridge {{ matrix_coturn_docker_network }}"
when: "matrix_coturn_enabled|bool and matrix_coturn_result_docker_network.stdout == ''"
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:


Carregando…
Cancelar
Guardar