diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-06-06 22:52:57 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-06-06 22:52:57 +0300 |
| commit | fc1d79968a811c83f83429734c9adec14c46711b (patch) | |
| tree | e456fda9ec491b35b28e91e2cdcdf1beff2e91b6 /roles/jails/04_taulubot/tasks | |
| parent | 224ef25da57b0957f190ca2e2e3bd0045792cdb8 (diff) | |
Work on jails
Diffstat (limited to 'roles/jails/04_taulubot/tasks')
| -rw-r--r-- | roles/jails/04_taulubot/tasks/main.yml | 37 |
1 files changed, 13 insertions, 24 deletions
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 |
