sync roles with changes from OWS

This commit is contained in:
Oli
2023-10-21 13:13:20 +00:00
parent e14271eab0
commit ccd75528ed
43 changed files with 479 additions and 107 deletions

View File

@@ -46,11 +46,21 @@
nextcloud_exporter_version: "{{ nextcloud_exporter_version | replace('v', '', 1) | trim }}"
run_once: true
- name: Set architecture alias
set_fact:
architecture_alias: "amd64" # noqa: var-naming[no-role-prefix]
when: ansible_architecture == "x86_64"
- name: Set architecture alias
set_fact:
architecture_alias: "arm64" # noqa: var-naming[no-role-prefix]
when: ansible_architecture == "aarch64"
- name: "Download nextcloud_exporter from GitHub (v{{ nextcloud_exporter_version.tag }})"
get_url:
url: "https://github.com/xperimental/nextcloud-exporter/releases/download/\
v{{ nextcloud_exporter_version.tag }}/nextcloud-exporter-{{ nextcloud_exporter_version.tag }}\
-{{ deb_architecture }}.bz2"
v{{ nextcloud_exporter_version.tag }}/nextcloud-exporter_{{ nextcloud_exporter_version.tag }}\
_{{ architecture_alias }}.bz2"
dest: "/var/tmp/nextcloud-exporter.bz2"
mode: "0644"
register: nextcloud_exporter_download_archive
@@ -60,7 +70,7 @@
- name: Decompress nextcloud_exporter
command:
cmd: "bzip2 -dk nextcloud-exporter.bz2"
cmd: "bzip2 -dkf nextcloud-exporter.bz2"
args:
chdir: /var/tmp/
register: nextcloud_exporter_decompress_archive
@@ -91,21 +101,11 @@
nextcloud_notify_push_version: "{{ nextcloud_notify_push_version | replace('v', '', 1) | trim }}"
run_once: true
- name: Set deb_architecture alias and filename
set_fact:
notify_push_filename: "x86_64-unknown-linux-musl" # noqa: var-naming[no-role-prefix]
when: deb_architecture == "amd64"
- name: Set deb_architecture alias and filename
set_fact:
notify_push_filename: "armv7-unknown-linux-musleabihf" # noqa: var-naming[no-role-prefix]
when: deb_architecture == "arm64"
- name: "Download nextcloud_notify_push from GitHub (v{{ nextcloud_notify_push_version.tag }})"
get_url:
url: "https://github.com/nextcloud/notify_push/releases/download/v{{ nextcloud_notify_push_version.tag }}\
/notify_push-{{ notify_push_filename }}"
dest: "/var/tmp/notify_push"
/notify_push-{{ ansible_architecture }}-unknown-linux-musl"
dest: "/var/tmp/nextcloud_notify_push"
mode: "0700"
register: nextcloud_notify_push_download_file
until: nextcloud_notify_push_download_file is succeeded
@@ -115,7 +115,7 @@
- name: Copy nextcloud_notify_push
copy:
remote_src: true
src: "/var/tmp/notify_push"
src: "/var/tmp/nextcloud_notify_push"
dest: "{{ nextcloud_notify_push_install_dir }}/nextcloud_notify_push"
owner: "{{ webserver_user }}"
group: "{{ webserver_group }}"