Change more instances of SimpleXMQ and fix container task
This commit is contained in:
parent
58440296d3
commit
8e805e2ccc
|
@ -1,28 +1,27 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
---
|
---
|
||||||
- name: Create SimpleXMQ config directory
|
- name: Create SMP server volume directories
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
name: "{{ services.smp_server.volume }}/config"
|
name: "{{ services.smp_server.volume }}/{{ dir }}"
|
||||||
owner: root
|
owner: root
|
||||||
mode: u=rwx,g=rx,o=rx
|
mode: u=rwx,g=rx,o=rx
|
||||||
state: directory
|
state: directory
|
||||||
|
loop:
|
||||||
|
- config
|
||||||
|
- logs
|
||||||
|
loop_control:
|
||||||
|
loop_var: dir
|
||||||
|
|
||||||
- name: Create SimpleXMQ logs directory
|
- name: Create Docker network for SMP server
|
||||||
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
|
|
||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
name: smp-server
|
name: smp-server
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Deploy SimpleXMQ Docker container
|
- name: Deploy SMP server Docker container
|
||||||
community.docker.docker_container:
|
community.docker.docker_container:
|
||||||
name: smp-server
|
name: smp-server
|
||||||
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
|
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 }}
|
image: simplexchat/smp-server:{{ services.smp_server.version }}
|
||||||
restart_policy: always
|
restart_policy: always
|
||||||
default_host_ip: ''
|
default_host_ip: ''
|
||||||
|
@ -35,3 +34,5 @@
|
||||||
- "{{ services.smp_server.volume }}/logs:/var/opt/simplex:rw"
|
- "{{ services.smp_server.volume }}/logs:/var/opt/simplex:rw"
|
||||||
published_ports:
|
published_ports:
|
||||||
- 5223:5223/tcp
|
- 5223:5223/tcp
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.stop-signal: SIGINT
|
||||||
|
|
Reference in a new issue