This repository has been archived on 2024-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
cpx-ansible/roles/docker_services/tasks/services/simplexmq_smp.yml

36 lines
1 KiB
YAML
Raw Normal View History

2023-04-20 22:38:03 +00:00
# vim: ft=yaml.ansible
---
- name: Create SMP server volume directories
2023-04-20 22:38:03 +00:00
ansible.builtin.file:
2023-05-14 00:22:15 +00:00
name: "{{ services.simplexmq_smp.volume }}/{{ dir }}"
2023-04-20 22:38:03 +00:00
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
2023-04-20 22:57:06 +00:00
loop:
- config
- logs
loop_control:
loop_var: dir
2023-04-20 22:38:03 +00:00
- name: Deploy SMP server Docker container
2023-04-20 22:38:03 +00:00
community.docker.docker_container:
name: smp-server
2023-04-20 22:38:03 +00:00
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
2023-04-27 17:09:09 +00:00
restart: "{{ stop is undefined or not stop }}"
2023-05-14 00:22:15 +00:00
image: simplexchat/smp-server:{{ services.simplexmq_smp.version }}
2023-04-20 22:38:03 +00:00
restart_policy: always
default_host_ip: ''
2023-04-20 22:38:03 +00:00
networks:
2023-04-22 16:50:32 +00:00
- name: tor
aliases:
- smp-server
2023-04-20 22:38:03 +00:00
env:
2023-05-14 00:54:20 +00:00
ADDR: "{{ services.simplexmq_smp.domain }}"
2023-04-20 22:38:03 +00:00
volumes:
2023-05-14 00:22:15 +00:00
- "{{ services.simplexmq_smp.volume }}/config:/etc/opt/simplex:rw"
- "{{ services.simplexmq_smp.volume }}/logs:/var/opt/simplex:rw"
2023-04-20 22:38:03 +00:00
published_ports:
- 5223:5223/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT