aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/04_taulubot
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-06-06 22:52:57 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-06-06 22:52:57 +0300
commitfc1d79968a811c83f83429734c9adec14c46711b (patch)
treee456fda9ec491b35b28e91e2cdcdf1beff2e91b6 /roles/jails/04_taulubot
parent224ef25da57b0957f190ca2e2e3bd0045792cdb8 (diff)
Work on jails
Diffstat (limited to 'roles/jails/04_taulubot')
-rw-r--r--roles/jails/04_taulubot/defaults/main.yml2
-rw-r--r--roles/jails/04_taulubot/tasks/main.yml37
2 files changed, 14 insertions, 25 deletions
diff --git a/roles/jails/04_taulubot/defaults/main.yml b/roles/jails/04_taulubot/defaults/main.yml
index 7220635..e6b2279 100644
--- a/roles/jails/04_taulubot/defaults/main.yml
+++ b/roles/jails/04_taulubot/defaults/main.yml
@@ -1,4 +1,4 @@
-userland: "14.3-RELEASE"
+userland: "15.0-RELEASE"
pkg:
- python311
diff --git a/roles/jails/04_taulubot/tasks/main.yml b/roles/jails/04_taulubot/tasks/main.yml
index 4054161..92624ff 100644
--- a/roles/jails/04_taulubot/tasks/main.yml
+++ b/roles/jails/04_taulubot/tasks/main.yml
@@ -19,34 +19,23 @@
mode: "0600"
no_log: true
-- name: Clone taulubot
+- name: Install taulubot from port
shell: |
- GIT_SSH_COMMAND="ssh -i /root/.ssh/deploy_key -o StrictHostKeyChecking=no" git clone git@github.com:jantuomi/taulubot.git /tmp/taulubot
- cp -a /tmp/taulubot/* /tmp/taulubot/.git /tmp/taulubot/.gitignore /usr/local/taulubot/ 2>/dev/null || true
- rm -rf /tmp/taulubot
- args:
- creates: /usr/local/taulubot/.git
+ export GIT_SSH_COMMAND='ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no'
+ cd /usr/ports/net-im/taulubot
+ make install WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles
+ register: _taulubot_install
+ failed_when: "_taulubot_install.rc != 0"
+ changed_when: "'Installing taulubot' in _taulubot_install.stdout"
-- name: Install Python dependencies
- shell: pip install -r /usr/local/taulubot/requirements.txt
- args:
- creates: /usr/local/taulubot/.deps_installed
- register: _pip_install
-
-- name: Mark dependencies installed
- file:
- path: /usr/local/taulubot/.deps_installed
- state: touch
- when: _pip_install is changed
-
-- name: Deploy rc.d script
- template:
- src: "{{ jail_role_dir }}/templates/usr_local_etc_rc.d_taulubot"
- dest: /usr/local/etc/rc.d/taulubot
+- name: Deploy bot token file
+ copy:
+ content: "{{ taulubot_token }}"
+ dest: /usr/local/etc/taulubot.token
owner: root
group: wheel
- mode: "0755"
- notify: Restart taulubot
+ mode: "0600"
+ no_log: true
- import_role:
name: jail