ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 0971a6fb200cc0ccc3884d24e9597bb3e4f83293
parent 371f8bd8bfee64e1c77c3161be5b989856e0108d
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Mon, 28 Sep 2020 22:22:48 +0300

element: Change riot to element on variable names

Diffstat:
ansible/inventory/host_vars/productionmatrix/element.yml | 16++++++++++++++++
ansible/inventory/host_vars/productionmatrix/riot.yml | 16----------------
ansible/roles/element/defaults/main.yml | 22+++++++++++-----------
ansible/roles/element/tasks/main.yml | 19+++++++++----------
ansible/roles/element/templates/config.json | 12++++++------
5 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/ansible/inventory/host_vars/productionmatrix/element.yml b/ansible/inventory/host_vars/productionmatrix/element.yml @@ -0,0 +1,16 @@ +--- + +element__server_room_directory: + - "erethon.com" + +element__deploy_directory: "/srv/www/sites/riot.dgrig.com/public/" + +element__matrix_homeserver: "https://matrix.erethon.com" + +element__matrix_server_name: "erethon.com" + +element__brand: "Erethon Riot" + +element__jitsi_url: "meet.libreops.cc" + +element__matrix_identity_server: "" diff --git a/ansible/inventory/host_vars/productionmatrix/riot.yml b/ansible/inventory/host_vars/productionmatrix/riot.yml @@ -1,16 +0,0 @@ ---- - -riot__server_room_directory: - - "erethon.com" - -riot__deploy_directory: "/srv/www/sites/riot.dgrig.com/public/" - -riot__matrix_homeserver: "https://matrix.erethon.com" - -riot__matrix_server_name: "erethon.com" - -riot__brand: "Erethon Riot" - -riot__jitsi_url: "meet.libreops.cc" - -riot__matrix_identity_server: "" diff --git a/ansible/roles/element/defaults/main.yml b/ansible/roles/element/defaults/main.yml @@ -1,23 +1,23 @@ --- -riot__signing_key: https://packages.riot.im/riot-release-key.asc +element__signing_key: https://packages.riot.im/riot-release-key.asc -riot__release_version: "1.7.8" +element__release_version: "1.7.8" -riot__release_checksum: "c60fa34425516d860ab96dcf2d27008825b0a8533d0a576911be6dd5f73b06a5bf3a6a8a538496b7f3348e5f22cdc9adfe5b76c3eed49963cbb3fd728ce9daea" +element__release_checksum: "c60fa34425516d860ab96dcf2d27008825b0a8533d0a576911be6dd5f73b06a5bf3a6a8a538496b7f3348e5f22cdc9adfe5b76c3eed49963cbb3fd728ce9daea" -riot__release_url: "https://github.com/vector-im/element-web/releases/download/v{{ riot__release_version }}/riot-v{{ riot__release_version }}.tar.gz" +element__release_url: "https://github.com/vector-im/element-web/releases/download/v{{ element__release_version }}/riot-v{{ element__release_version }}.tar.gz" -riot__release_signature_url: "https://github.com/vector-im/element-web/releases/download/v{{ riot__release_version }}/riot-v{{ riot__release_version }}.tar.gz.asc" +element__release_signature_url: "https://github.com/vector-im/element-web/releases/download/v{{ element__release_version }}/riot-v{{ element__release_version }}.tar.gz.asc" -riot__deploy_directory: "" +element__deploy_directory: "" -riot__matrix_homeserver: "https://matrix.org" +element__matrix_homeserver: "https://matrix.org" -riot__matrix_server_name: "matrix.org" +element__matrix_server_name: "matrix.org" -riot__matrix_identity_server: "https://vector.im" +element__matrix_identity_server: "https://vector.im" -riot__brand: "Riot" +element__brand: "Riot" -riot__jitsi_url: "jitsi.modular.im" +element__jitsi_url: "jitsi.modular.im" diff --git a/ansible/roles/element/tasks/main.yml b/ansible/roles/element/tasks/main.yml @@ -2,7 +2,7 @@ - name: Download Riot GPG key get_url: - url: "{{ riot__signing_key }}" + url: "{{ element__signing_key }}" dest: /tmp/riot-release-key.asc - name: Import Riot GPG key @@ -10,27 +10,27 @@ - name: Download Riot release get_url: - url: "{{ riot__release_url }}" + url: "{{ element__release_url }}" dest: /tmp/ - checksum: "sha512:{{ riot__release_checksum }}" + checksum: "sha512:{{ element__release_checksum }}" - name: Download Riot signature file get_url: - url: "{{ riot__release_signature_url }}" + url: "{{ element__release_signature_url }}" dest: /tmp/ - name: Verify Riot release with signature file - shell: "gpg --verify /tmp/riot-v{{ riot__release_version }}.tar.gz.asc /tmp/riot-v{{ riot__release_version }}.tar.gz" + shell: "gpg --verify /tmp/riot-v{{ element__release_version }}.tar.gz.asc /tmp/riot-v{{ element__release_version }}.tar.gz" - name: Extract and deploy Riot to the webserver directory unarchive: - src: /tmp/riot-v{{ riot__release_version }}.tar.gz - dest: "{{ riot__deploy_directory }}" + src: /tmp/riot-v{{ element__release_version }}.tar.gz + dest: "{{ element__deploy_directory }}" remote_src: yes extra_opts: [--strip-components=1] - name: Configure Riot template: src: config.json - dest: "{{ riot__deploy_directory }}/config.json" - tags: ["riot::configure"]- \ No newline at end of file + dest: "{{ element__deploy_directory }}/config.json" + tags: ["riot::configure"] diff --git a/ansible/roles/element/templates/config.json b/ansible/roles/element/templates/config.json @@ -1,18 +1,18 @@ { "default_server_config": { "m.homeserver": { - "base_url": " {{ riot__matrix_homeserver | d('https://matrix.org') }}", - "server_name": "{{ riot__matrix_server_name | d('matrix.org') }}" + "base_url": " {{ element__matrix_homeserver | d('https://matrix.org') }}", + "server_name": "{{ element__matrix_server_name | d('matrix.org') }}" }, "m.identity_server": { - "base_url": "{{ riot__matrix_identity_server | d('https://vector.im') }}" + "base_url": "{{ element__matrix_identity_server | d('https://vector.im') }}" } }, "disable_custom_urls": false, "disable_guests": true, "disable_login_language_selector": false, "disable_3pid_login": false, - "brand": "{{ riot__brand | d('Riot')}}", + "brand": "{{ element__brand | d('Element')}}", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", "integrations_widgets_urls": [ @@ -35,7 +35,7 @@ "default_theme": "dark", "roomDirectory": { "servers": [ - {% for server in riot__server_room_directory|d([]) %} + {% for server in element__server_room_directory|d([]) %} "{{ server }}", {% endfor %} "matrix.org" @@ -50,6 +50,6 @@ "breadcrumbs": true }, "jitsi": { - "preferredDomain": "{{ riot__jitsi_url }}" + "preferredDomain": "{{ element__jitsi_url }}" } }