mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-14 05:02:27 +00:00
a76ebb1fad
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.
45 lines
1.4 KiB
YAML
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"
|