2025-09-30 13:27:57 +01:00
|
|
|
---
|
|
|
|
|
- name: Install keanu weblite
|
|
|
|
|
hosts: all
|
|
|
|
|
become: true
|
|
|
|
|
tasks:
|
|
|
|
|
- name: Ensure previous keanu-weblite temp directory is removed
|
|
|
|
|
file:
|
|
|
|
|
path: /tmp/keanu-weblite
|
|
|
|
|
state: absent
|
|
|
|
|
|
2026-01-21 16:21:00 +00:00
|
|
|
- name: Download pre-built keanu archive
|
|
|
|
|
get_url:
|
|
|
|
|
url: "https://guardianproject.dev/api/packages/butter/generic/keanu-weblite/latest/keanu-weblite-main.tar.gz"
|
|
|
|
|
dest: /tmp
|
|
|
|
|
mode: '0644'
|
2025-09-30 13:27:57 +01:00
|
|
|
|
2026-01-21 16:21:00 +00:00
|
|
|
- name: Untar keanu-weblite
|
|
|
|
|
unarchive:
|
|
|
|
|
src: "/tmp/keanu-weblite-main.tar.gz"
|
|
|
|
|
dest: "/var/www/html/chat"
|
|
|
|
|
remote_src: yes
|
|
|
|
|
extra_opts: [--strip-components=1]
|
2025-09-30 13:27:57 +01:00
|
|
|
|
|
|
|
|
- name: Download keanu-weblite config file
|
|
|
|
|
get_url:
|
|
|
|
|
url: "{{ config_base_url }}/keanu-weblite-config.json"
|
2026-01-21 16:21:00 +00:00
|
|
|
dest: /var/www/html/chat/config.json
|
2025-09-30 13:27:57 +01:00
|
|
|
mode: '0644'
|
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
- name: Replace REPLACEME with butter_name in config.json
|
|
|
|
|
replace:
|
|
|
|
|
path: /tmp/keanu-weblite/src/assets/config.json
|
|
|
|
|
regexp: 'REPLACEME'
|
|
|
|
|
replace: "{{ butter_name }}"
|
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
- name: Set permissions for /var/www/html/chat
|
|
|
|
|
become: true
|
|
|
|
|
file:
|
|
|
|
|
path: /var/www/html/chat
|
|
|
|
|
owner: www-data
|
|
|
|
|
group: www-data
|
|
|
|
|
mode: '0755'
|
|
|
|
|
recurse: yes
|
|
|
|
|
|
|
|
|
|
- name: Restart lighttpd service
|
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
|
name: lighttpd
|
|
|
|
|
state: restarted
|
|
|
|
|
when: not (is_vmdb2 | bool)
|