1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
- name: Run IRC
hosts: lotus-land-story
vars:
gamja_version: "{{ versions.gamja }}"
soju_version: "{{ versions.soju }}"
tasks:
- name: Make directories
ansible.builtin.file:
path: /mnt/lotus-land-story/{{ item }}
state: directory
mode: "0755"
loop:
- caddy/data/gamja
- soju
- name: Download Gamja
ansible.builtin.unarchive:
src: https://github.com/kejadlen/gamja-build/releases/download/gamja-{{ gamja_version }}/gamja.tar.gz
dest: /mnt/lotus-land-story/caddy/data/gamja
remote_src: true
- name: Configure Soju
ansible.builtin.copy:
dest: /mnt/lotus-land-story/soju/soju.conf
content: |
# listen unix+admin://
listen irc+insecure://0.0.0.0:6697
listen ws+insecure://0.0.0.0:3030
listen http+prometheus://localhost:9090
db sqlite3 /soju/soju.db
mode: "0600"
- name: Get docker network
community.docker.docker_network:
name: lotus_land_story
register: docker_network
- name: Run Soju
community.docker.docker_container:
restart: true
name: soju
image: ghcr.io/kejadlen/soju:{{ soju_version }}
restart_policy: unless-stopped
volumes:
- /mnt/lotus-land-story/soju:/soju
ports:
- "6697:6697"
networks:
- name: lotus_land_story
handlers:
- name: Import restarts
ansible.builtin.import_tasks: restarts.yml
# vim: ft=yaml.ansible