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.yml

34 lines
929 B
YAML

# vim: ft=yaml.ansible
---
- name: Create SimpleXMQ volume directories
ansible.builtin.file:
name: "{{ services.simplexmq.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- config
- logs
loop_control:
loop_var: dir
- name: Deploy SimpleXMQ Docker container
community.docker.docker_container:
name: simplexmq
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
image: simplexchat/simplexmq:{{ services.simplexmq.version }}
restart_policy: always
networks:
- name: tor
aliases:
- simplexmq
env:
addr: "{{ services.simplexmq.domain }}"
volumes:
- "{{ services.simplexmq.volume }}/config:/etc/opt/simplex:rw"
- "{{ services.simplexmq.volume }}/logs:/var/opt/simplex:rw"
published_ports:
- 5223:5223/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT