churn/ansible/install-keanu-weblite.yml

53 lines
1.4 KiB
YAML

---
- name: Install keanu weblite
hosts: all
become: true
tasks:
- name: Download pre-built keanu archive
get_url:
url: "https://guardianproject.dev/api/packages/butter/generic/keanu-weblite/latest/keanu-weblite-dev.tar.gz"
dest: /tmp
mode: '0644'
- name: Create keanu-weblite web directory
file:
path: "/var/www/html/chat"
state: directory
owner: www-data
group: www-data
mode: '0755'
recurse: yes
- name: Untar keanu-weblite
unarchive:
src: "/tmp/keanu-weblite-dev.tar.gz"
dest: "/var/www/html/chat/"
remote_src: yes
extra_opts: [--strip-components=1]
- name: Download keanu-weblite config file
get_url:
url: "{{ config_base_url }}/keanu-weblite-config.json"
dest: /var/www/html/chat/config.json
mode: '0644'
- name: Replace REPLACEME with butter_name in config.json
replace:
path: /var/www/html/chat/config.json
regexp: 'REPLACEME'
replace: "{{ butter_name }}"
- 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)