Use pre-built keanu assets

This commit is contained in:
Ana Custura 2026-01-21 16:21:00 +00:00
parent 229d29fee6
commit d816bea2d2

View file

@ -3,37 +3,28 @@
hosts: all hosts: all
become: true become: true
tasks: tasks:
- name: Install Node.js 22 (needed for matrix-js-sdk)
shell: |
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
args:
executable: /bin/bash
- name: Ensure previous keanu-weblite temp directory is removed - name: Ensure previous keanu-weblite temp directory is removed
file: file:
path: /tmp/keanu-weblite path: /tmp/keanu-weblite
state: absent state: absent
delegate_to: localhost
- name: Clone keanu-weblite repository (dev branch) - name: Download pre-built keanu archive
git: get_url:
repo: https://gitlab.com/keanuapp/keanuapp-weblite.git url: "https://guardianproject.dev/api/packages/butter/generic/keanu-weblite/latest/keanu-weblite-main.tar.gz"
dest: /tmp/keanu-weblite dest: /tmp
version: dev mode: '0644'
depth: 1
delegate_to: localhost
- name: Run npm install - name: Untar keanu-weblite
shell: npm install unarchive:
args: src: "/tmp/keanu-weblite-main.tar.gz"
chdir: /tmp/keanu-weblite dest: "/var/www/html/chat"
delegate_to: localhost remote_src: yes
extra_opts: [--strip-components=1]
- name: Download keanu-weblite config file - name: Download keanu-weblite config file
get_url: get_url:
url: "{{ config_base_url }}/keanu-weblite-config.json" url: "{{ config_base_url }}/keanu-weblite-config.json"
dest: /tmp/keanu-weblite/src/assets/config.json dest: /var/www/html/chat/config.json
mode: '0644' mode: '0644'
delegate_to: localhost delegate_to: localhost
@ -44,20 +35,6 @@
replace: "{{ butter_name }}" replace: "{{ butter_name }}"
delegate_to: localhost delegate_to: localhost
- name: Run npm build with legacy OpenSSL option
shell: |
export NODE_OPTIONS=--openssl-legacy-provider
npm run build
args:
chdir: /tmp/keanu-weblite
delegate_to: localhost
- name: Copy build output to /var/www/html/chat
become: true
copy:
src: /tmp/keanu-weblite/dist/
dest: /var/www/html/chat/
- name: Set permissions for /var/www/html/chat - name: Set permissions for /var/www/html/chat
become: true become: true
file: file:
@ -72,4 +49,3 @@
name: lighttpd name: lighttpd
state: restarted state: restarted
when: not (is_vmdb2 | bool) when: not (is_vmdb2 | bool)