Change more instances of SimpleXMQ and fix container task

This commit is contained in:
Sam A. 2023-04-27 19:09:36 +02:00
parent 58440296d3
commit 8e805e2ccc
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,28 +1,27 @@
# vim: ft=yaml.ansible
---
- name: Create SimpleXMQ config directory
- name: Create SMP server volume directories
ansible.builtin.file:
name: "{{ services.smp_server.volume }}/config"
name: "{{ services.smp_server.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- config
- logs
loop_control:
loop_var: dir
- name: Create SimpleXMQ logs directory
ansible.builtin.file:
name: "{{ services.smp_server.volume }}/logs"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
- name: Create Docker network for SimpleXMQ
- name: Create Docker network for SMP server
community.docker.docker_network:
name: smp-server
state: present
- name: Deploy SimpleXMQ Docker container
- name: Deploy SMP server Docker container
community.docker.docker_container:
name: smp-server
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: simplexchat/smp-server:{{ services.smp_server.version }}
restart_policy: always
default_host_ip: ''
@ -35,3 +34,5 @@
- "{{ services.smp_server.volume }}/logs:/var/opt/simplex:rw"
published_ports:
- 5223:5223/tcp
labels:
com.centurylinklabs.watchtower.stop-signal: SIGINT