diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-05-16 21:49:01 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-05-16 22:31:59 +0300 |
| commit | 60f363a7e2aa7ff81b0785dbf49d4c9867653337 (patch) | |
| tree | 126a5ba8a672926cc9fa65aedaf0e73f795fe38a /roles/jails/03_irc_thelounge/tasks | |
| parent | 75732c1a9aa1fed11794f509d33bdea5171d41c0 (diff) | |
Add thelounge jail
Diffstat (limited to 'roles/jails/03_irc_thelounge/tasks')
| -rw-r--r-- | roles/jails/03_irc_thelounge/tasks/main.yml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/roles/jails/03_irc_thelounge/tasks/main.yml b/roles/jails/03_irc_thelounge/tasks/main.yml index 2abdaff..073b16a 100644 --- a/roles/jails/03_irc_thelounge/tasks/main.yml +++ b/roles/jails/03_irc_thelounge/tasks/main.yml @@ -1,2 +1,60 @@ - import_role: name: jail + tasks_from: jail_setup + +- name: Check if old thelounge data exists + stat: + path: /root/.thelounge/config.js + register: _old_thelounge + +- name: "*** MIGRATION REQUIRED: thelounge data ***" + pause: + prompt: | + + ════════════════════════════════════════════════════════════════ + THELOUNGE DATA MIGRATION + ════════════════════════════════════════════════════════════════ + /root/.thelounge still exists. Migrate manually: + + 1. jexec irc_thelounge service thelounge stop + 2. On host: zfs set mountpoint=/usr/local/jails/containers/irc_thelounge/var/db/thelounge zroot/jails/volumes/irc_thelounge + 3. jexec irc_thelounge cp -a /root/.thelounge/* /var/db/thelounge/ + 4. jexec irc_thelounge service thelounge start + 5. Destroy old volumes when confirmed working: + zfs destroy zroot/jails/volumes/irc_thelounge_logs + zfs destroy zroot/jails/volumes/irc_thelounge_uploads + 6. jexec irc_thelounge rm -rf /root/.thelounge + ════════════════════════════════════════════════════════════════ + + Press Enter after migration is complete or Ctrl+C to abort + when: _old_thelounge.stat.exists + +- name: Clone thelounge + shell: | + git clone --depth 1 --branch v4.4.3 https://github.com/thelounge/thelounge.git /usr/local/share/thelounge + args: + creates: /usr/local/share/thelounge + +- name: Install thelounge dependencies and build + shell: cd /usr/local/share/thelounge && yarn install && NODE_ENV=production yarn build + args: + creates: /usr/local/share/thelounge/dist + +- name: Link thelounge binary + file: + src: /usr/local/share/thelounge/index.js + dest: /usr/local/bin/thelounge + state: link + +- name: Deploy thelounge config + copy: + src: "{{ jail_role_dir }}/files/config.js" + dest: /var/db/thelounge/config.js + owner: root + group: wheel + mode: "0644" + notify: Restart thelounge + +- import_role: + name: jail + tasks_from: jail_launch |
