pull out container name into a variable

This commit is contained in:
Jan Christian Grünhage 2020-05-27 18:35:20 +02:00
parent 676f02c757
commit 80858f1760
3 changed files with 3 additions and 2 deletions

View file

@ -15,3 +15,4 @@ matrix_synapse_docker_ports: ["8008:8008", "8448:8448"]
matrix_synapse_docker_labels: {}
matrix_synapse_extra_docker_volumes: []
matrix_synapse_container_ref: "docker.io/matrixdotorg/synapse"
matrix_synapse_container_name: "synapse"

View file

@ -13,7 +13,7 @@
- name: "restart synapse using docker"
docker_container:
name: synapse
name: "{{ matrix_synapse_container_name }}"
state: started
restart: yes
when: matrix_synapse_supervision_method == "docker"

View file

@ -55,7 +55,7 @@
- name: install synapse with docker
docker_container:
name: synapse
name: "{{ matrix_synapse_container_name }}"
image: "{{ matrix_synapse_container_ref }}:{{ matrix_synapse_version }}"
ports: "{{ matrix_synapse_docker_ports }}"
labels: "{{ matrix_synapse_docker_labels }}"