2022-10-15 15:33:12 +00:00
|
|
|
- name: Get current running containers
|
|
|
|
community.docker.docker_host_info:
|
|
|
|
containers: yes
|
|
|
|
register: docker_info
|
|
|
|
|
|
|
|
- name: Stop/Remove all current containers
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
loop: "{{ docker_info.containers | map(attribute='Id') | list }}"
|
|
|
|
|
|
|
|
- name: Prune everything
|
|
|
|
community.docker.docker_prune:
|
|
|
|
containers: yes
|
|
|
|
images: yes
|
|
|
|
volumes: yes
|
|
|
|
|
|
|
|
- name: Start coturn container
|
2022-10-15 13:13:25 +00:00
|
|
|
community.docker.docker_container:
|
|
|
|
name: coturn
|
2022-10-15 13:17:28 +00:00
|
|
|
image: bv11-cr01.bessems.eu/proxy/coturn/coturn:{{ coturn.version }}
|
2022-10-15 15:46:51 +00:00
|
|
|
command: >
|
2022-10-15 13:13:25 +00:00
|
|
|
-n \
|
|
|
|
-v \
|
|
|
|
--log-file=stdout \
|
|
|
|
--lt-cred-mech \
|
2022-10-15 15:46:51 +00:00
|
|
|
--no-cli \
|
|
|
|
--no-tls \
|
2022-10-16 20:28:36 +00:00
|
|
|
--relay-ip='turn.spamasaurus.com' \
|
|
|
|
--external-ip='turn.spamasaurus.com' \
|
2022-10-17 03:03:35 +00:00
|
|
|
--user=dendrite:dendrite \
|
2022-10-15 15:46:51 +00:00
|
|
|
--realm=dendrite
|
2022-10-15 13:13:25 +00:00
|
|
|
network_mode: host
|
2022-10-15 15:33:12 +00:00
|
|
|
state: started
|
2022-10-15 13:13:25 +00:00
|
|
|
restart_policy: unless-stopped
|
2022-10-15 15:33:12 +00:00
|
|
|
recreate: yes
|