Initial changes to integrate new portal

This commit is contained in:
Ana Custura 2026-03-06 09:04:11 +00:00
parent c4ffbb00e2
commit 0fa18af48e
18 changed files with 311 additions and 221 deletions

View file

@ -4,20 +4,21 @@
become: true
tasks:
- name: Install Node.js 22 (needed for matrix-js-sdk)
shell: |
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
ansible.builtin.shell: |
set -o pipefail curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
args:
executable: /bin/bash
creates: /bin/npm
- name: Ensure previous keanu-weblite temp directory is removed
file:
ansible.builtin.file:
path: /tmp/keanu-weblite
state: absent
delegate_to: localhost
- name: Clone keanu-weblite repository (dev branch)
git:
ansible.builtin.git:
repo: https://gitlab.com/keanuapp/keanuapp-weblite.git
dest: /tmp/keanu-weblite
version: dev
@ -25,51 +26,45 @@
delegate_to: localhost
- name: Run npm install
shell: npm install
ansible.builtin.command: npm install
args:
chdir: /tmp/keanu-weblite
delegate_to: localhost
changed_when: false
- name: Download keanu-weblite config file
get_url:
ansible.builtin.get_url:
url: "{{ config_base_url }}/keanu-weblite-config.json"
dest: /tmp/keanu-weblite/src/assets/config.json
mode: '0644'
delegate_to: localhost
- name: Replace REPLACEME with butter_name in config.json
replace:
ansible.builtin.replace:
path: /tmp/keanu-weblite/src/assets/config.json
regexp: 'REPLACEME'
replace: "{{ butter_name }}"
delegate_to: localhost
- name: Run npm build with legacy OpenSSL option
shell: |
ansible.builtin.shell: |
export NODE_OPTIONS=--openssl-legacy-provider
npm run build
args:
chdir: /tmp/keanu-weblite
delegate_to: localhost
changed_when: false
- name: Copy build output to /var/www/html/chat
become: true
copy:
src: /tmp/keanu-weblite/dist/
dest: /var/www/html/chat/
ansible.builtin.copy:
src: /tmp/keanu-weblite/dist/
dest: /var/www/html/chat/
mode: '0755'
- name: Set permissions for /var/www/html/chat
become: true
file:
ansible.builtin.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)
recurse: true