Ansible.Turn/roles/turn/tasks/main.yml

34 lines
834 B
YAML
Raw Normal View History

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 13:13:25 +00:00
command: |
-n \
-v \
--log-file=stdout \
--lt-cred-mech \
--no-cli \
--no-tls \
--realm=dendrite
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