Update to 2021-12-01 19:13

This commit is contained in:
Daniel Berteaud
2021-12-01 19:13:34 +01:00
commit 4c4556c660
2153 changed files with 60999 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
---
- import_tasks: ../includes/webapps_compress_archive.yml
vars:
- root_dir: "{{ element_root_dir }}"
- version: "{{ element_current_version }}"
when: element_install_mode == 'upgrade'
tags: matrix

View File

@@ -0,0 +1,7 @@
---
- import_tasks: ../includes/webapps_archive.yml
vars:
- root_dir: "{{ element_root_dir }}"
- version: "{{ element_current_version }}"
tags: matrix

View File

@@ -0,0 +1,16 @@
---
- name: Remove temp files
file: path={{ element_root_dir }}/tmp/{{ item }} state=absent
loop:
- element-v{{ element_version }}.tar.gz
- element-v{{ element_version }}
tags: matrix
- name: Remove old Riot install
file: path={{ item }} state=absent
loop:
- /opt/matrix/riot
- /etc/httpd/ansible_conf.d/10-riot_riot.conf
notify: reload httpd
tags: matrix

View File

@@ -0,0 +1,15 @@
---
- name: Remove sample config file
file: path={{ element_root_dir }}/web/config.sample.json state=absent
tags: matrix
- name: Deploy configuration
template: src=config.json.j2 dest={{ element_root_dir }}/web/config.json
tags: matrix
- name: Deploy httpd configuration
template: src=httpd.conf.j2 dest=/etc/httpd/ansible_conf.d/10-element_{{ element_id }}.conf
notify: reload httpd
tags: matrix

View File

@@ -0,0 +1,11 @@
---
- name: Create directory structure
file: path={{ element_root_dir }}/{{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
with_items:
- dir: tmp
- dir: archives
mode: 700
- dir: meta
mode: 700
tags: matrix

View File

@@ -0,0 +1,12 @@
---
- import_tasks: ../includes/webapps_set_install_mode.yml
vars:
- root_dir: "{{ element_root_dir }}"
- version: "{{ element_version }}"
tags: matrix
- set_fact: element_install_mode={{ (install_mode == 'upgrade' and not element_manage_upgrade) | ternary('none',install_mode) }}
tags: matrix
- set_fact: element_current_version={{ current_version | default('') }}
tags: matrix

View File

@@ -0,0 +1,28 @@
---
- name: Download Riot
get_url:
url: "https://github.com/vector-im/element-web/releases/download/v{{ element_version }}/element-v{{ element_version }}.tar.gz"
dest: "{{ element_root_dir }}/tmp/"
checksum: "sha1:{{ element_archive_sha1 }}"
when: element_install_mode != 'none'
tags: matrix
- name: Extract element archive
unarchive:
src: "{{ element_root_dir }}/tmp/element-v{{ element_version }}.tar.gz"
dest: "{{ element_root_dir }}/tmp/"
remote_src: True
when: element_install_mode != 'none'
tags: matrix
- name: Move the content of element to the correct top directory
synchronize:
src: "{{ element_root_dir }}/tmp/element-v{{ element_version }}/"
dest: "{{ element_root_dir }}/web/"
recursive: True
delete: True
delegate_to: "{{ inventory_hostname }}"
when: element_install_mode != 'none'
tags: matrix

View File

@@ -0,0 +1,13 @@
---
- include: facts.yml
- include: directories.yml
- include: archive_pre.yml
when: element_install_mode == 'upgrade'
- include: install.yml
- include: conf.yml
- include: archive_post.yml
when: element_install_mode == 'upgrade'
- include: write_version.yml
- include: cleanup.yml

View File

@@ -0,0 +1,7 @@
---
- import_tasks: ../includes/webapps_post.yml
vars:
- root_dir: "{{ element_root_dir }}"
- version: "{{ element_version }}"
tags: matrix