ansible-collection-famedly-.../roles/element/tasks/main.yml
Jan Christian Grünhage a76ebb1fad fix(element): change folder name to match artifact
During the renaming of Riot to Element, the path for the webapp changed
from /opt/riot to /opt/element. In those folders, the archives are
unpacked, resulting in paths like /opt/element/riot-v${version}. Since
the archives are not yet renamed
(https://github.com/vector-im/element-web/issues/14896), this riot
reference has to stay for now. In the renaming, this was accidentally
changed prematurely, resulting in this regression.
2020-08-12 18:37:44 +02:00

45 lines
1.4 KiB
YAML

---
- name: Create element directory
file:
dest: "{{ element_webapp_dir }}"
state: directory
- name: Download and install element web app
import_tasks: download.yml
when: element_deployment_method == "webroot"
- name: Write main configuration
copy:
content: "{{ element_config | to_nice_json }}"
dest: "{{ element_webapp_dir }}/config.json"
- name: Write domain specific configurations
copy:
content: "{{ item.config | to_nice_json }}"
dest: "{{ element_webapp_dir }}/config.{{ item.domain }}.json"
loop: "{{ element_domain_configs }}"
- name: Link main configuration
file:
src: "{{ element_webapp_dir }}/config.json"
dest: "{{ element_webapp_dir }}/riot-v{{ element_version }}/config.json"
state: link
when: element_deployment_method == "webroot"
- name: Link domain specific configurations
file:
src: "{{ element_webapp_dir }}/config.{{ item.domain }}.json"
dest: "{{ element_webapp_dir }}/riot-v{{ element_version }}/config.{{ item.domain }}.json"
state: link
loop: "{{ element_domain_configs }}"
when: element_deployment_method == "webroot"
- name: Deploy docker container
docker_container:
name: "element-web"
image: "docker.io/vectorim/riot-web:v{{ element_version }}"
ports: "{{ element_docker_ports }}"
labels: "{{ element_docker_labels_complete }}"
restart_policy: unless-stopped
volumes: "{{ element_docker_volumes }}"
when: element_deployment_method == "docker"