From b9b015f1aa5c2120e469b0774bab409d00a490aa Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 16 Apr 2023 15:29:43 +0200 Subject: apt-repo/riot: rename to element and update key --- chaos-at-home/ch-equinox-t450s.yml | 2 +- chaos-at-home/ch-equinox-ws.yml | 2 +- inventory/host_vars/ch-equinox-t450s.yml | 2 +- inventory/host_vars/ch-equinox-ws.yml | 2 +- roles/apt-repo/element/files/repo.gpg | Bin 0 -> 2577 bytes roles/apt-repo/element/tasks/main.yml | 28 ++++++++++++++++++++++++++++ roles/apt-repo/riot/files/repo.gpg | Bin 2577 -> 0 bytes roles/apt-repo/riot/tasks/main.yml | 24 ------------------------ 8 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 roles/apt-repo/element/files/repo.gpg create mode 100644 roles/apt-repo/element/tasks/main.yml delete mode 100644 roles/apt-repo/riot/files/repo.gpg delete mode 100644 roles/apt-repo/riot/tasks/main.yml diff --git a/chaos-at-home/ch-equinox-t450s.yml b/chaos-at-home/ch-equinox-t450s.yml index 8dd80e6e..59f34690 100644 --- a/chaos-at-home/ch-equinox-t450s.yml +++ b/chaos-at-home/ch-equinox-t450s.yml @@ -16,7 +16,7 @@ - role: apt-repo/ansible - role: apt-repo/tor-project - role: apt-repo/kubernetes - - role: apt-repo/riot + - role: apt-repo/element - role: apt-repo/brave - role: apt-repo/kicad6 - role: storage/zfs/pools diff --git a/chaos-at-home/ch-equinox-ws.yml b/chaos-at-home/ch-equinox-ws.yml index 10607fd9..c27cba3d 100644 --- a/chaos-at-home/ch-equinox-ws.yml +++ b/chaos-at-home/ch-equinox-ws.yml @@ -17,7 +17,7 @@ - role: apt-repo/ansible - role: apt-repo/tor-project - role: apt-repo/kubernetes - - role: apt-repo/riot + - role: apt-repo/element - role: apt-repo/brave - role: apt-repo/freecad - role: apt-repo/kicad6 diff --git a/inventory/host_vars/ch-equinox-t450s.yml b/inventory/host_vars/ch-equinox-t450s.yml index 42ffec94..7378d95a 100644 --- a/inventory/host_vars/ch-equinox-t450s.yml +++ b/inventory/host_vars/ch-equinox-t450s.yml @@ -294,7 +294,7 @@ ws_base_extra_packages: - tor-geoipdb # needs apt-repo/kubernetes - kubectl - # needs apt-repo/riot + # needs apt-repo/element - element-desktop # needs apt-repo/brave - brave-browser diff --git a/inventory/host_vars/ch-equinox-ws.yml b/inventory/host_vars/ch-equinox-ws.yml index a25c6363..fb136a02 100644 --- a/inventory/host_vars/ch-equinox-ws.yml +++ b/inventory/host_vars/ch-equinox-ws.yml @@ -285,7 +285,7 @@ ws_base_extra_packages: - tor-geoipdb # needs apt-repo/kubernetes - kubectl - # needs apt-repo/riot + # needs apt-repo/element - element-desktop # needs apt-repo/brave - brave-browser diff --git a/roles/apt-repo/element/files/repo.gpg b/roles/apt-repo/element/files/repo.gpg new file mode 100644 index 00000000..6fbeecc6 Binary files /dev/null and b/roles/apt-repo/element/files/repo.gpg differ diff --git a/roles/apt-repo/element/tasks/main.yml b/roles/apt-repo/element/tasks/main.yml new file mode 100644 index 00000000..6971baab --- /dev/null +++ b/roles/apt-repo/element/tasks/main.yml @@ -0,0 +1,28 @@ +--- +- name: add repository key + copy: + src: repo.gpg + dest: /etc/apt/keyrings/element.gpg + register: apt_repo_element_key + +## TODO: remove once all servers have been converted +- name: remove repository key from old location + loop: + - /etc/apt/trusted.gpg.d/element.gpg + - /etc/apt/keyrings/riot.gpg + - /etc/apt/sources.list.d/riot.list + file: + path: "{{ item }}" + state: absent + +- name: add repository entry + copy: + content: | + deb [signed-by=/etc/apt/keyrings/element.gpg] https://packages.element.io/debian/ default main + dest: /etc/apt/sources.list.d/element.list + register: apt_repo_element_sources + +- name: update apt cache + when: apt_repo_element_key is changed or + apt_repo_element_sources is changed + command: apt-get update diff --git a/roles/apt-repo/riot/files/repo.gpg b/roles/apt-repo/riot/files/repo.gpg deleted file mode 100644 index fe7e26b5..00000000 Binary files a/roles/apt-repo/riot/files/repo.gpg and /dev/null differ diff --git a/roles/apt-repo/riot/tasks/main.yml b/roles/apt-repo/riot/tasks/main.yml deleted file mode 100644 index 52b8ccc9..00000000 --- a/roles/apt-repo/riot/tasks/main.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: add repository key - copy: - src: repo.gpg - dest: /etc/apt/keyrings/riot.gpg - register: apt_repo_riot_key - -## TODO: remove once all servers have been converted -- name: remove repository key from old location - file: - path: /etc/apt/trusted.gpg.d/riot.gpg - state: absent - -- name: add repository entry - copy: - content: | - deb [signed-by=/etc/apt/keyrings/riot.gpg] https://riot.im/packages/debian/ default main - dest: /etc/apt/sources.list.d/riot.list - register: apt_repo_riot_sources - -- name: update apt cache - when: apt_repo_riot_key is changed or - apt_repo_riot_sources is changed - command: apt-get update -- cgit v1.2.3