37 lines
1 KiB
YAML
37 lines
1 KiB
YAML
# vim: ft=yaml.ansible
|
|
---
|
|
- name: Create SimpleXMQ config directory
|
|
ansible.builtin.file:
|
|
name: "{{ services.simplexmq.volume }}/config"
|
|
owner: root
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- name: Create SimpleXMQ logs directory
|
|
ansible.builtin.file:
|
|
name: "{{ services.simplexmq.volume }}/logs"
|
|
owner: root
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- name: Create Docker network for SimpleXMQ
|
|
community.docker.docker_network:
|
|
name: simplexmq
|
|
state: present
|
|
|
|
- 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: 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
|