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
Raw Normal View History

2023-04-20 22:38:03 +00:00
# vim: ft=yaml.ansible
---
2023-04-20 22:57:06 +00:00
- name: Create SimpleXMQ volume directories
2023-04-20 22:38:03 +00:00
ansible.builtin.file:
2023-04-20 22:57:06 +00:00
name: "{{ services.simplexmq.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 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:
2023-04-22 16:50:32 +00:00
- name: tor
aliases:
- simplexmq
2023-04-20 22:38:03 +00:00
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