From 6acf0084901eb33c51bde708a0e7c07bcc3b9565 Mon Sep 17 00:00:00 2001 From: phil Date: Sat, 31 Dec 2022 13:43:36 +0100 Subject: [PATCH] nextcloud: Korrigiere lint-Warnungen --- tasks/common.yml | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/tasks/common.yml b/tasks/common.yml index 5c6ed81..141ebe6 100644 --- a/tasks/common.yml +++ b/tasks/common.yml @@ -1,6 +1,6 @@ --- -- name: "common | Apache-Module laden" - apache2_module: +- name: "Common | Aktiviere Apache-Module" + ansible.builtin.apache2_module: name: "{{ item.name }}" state: "{{ item.state|default('present') }}" loop: @@ -15,42 +15,44 @@ - name: setenvif notify: restart apache -- name: "common | Apache-Konfiguration für NC-Seiten" - file: +- name: "Common | Erstelle Apache-Konfiguration für NC-Seiten" + ansible.builtin.file: path: /etc/apache2/conf-available/nextcloud_sites.conf state: touch + mode: 0644 -- name: "common | Apache-Vorlage für Seitenkonfiguration kopieren" - template: +- name: "Common | Kopiere Apache-Vorlage für Seitenkonfiguration" + ansible.builtin.template: src: ../roles/nextcloud/templates/apache_site.conf.j2 dest: /etc/apache2/sites-available/nextcloud.conf + mode: 0644 -- name: "common | Apache-Seitenkonfiguration aktivieren" - file: - src: /etc/apache2/sites-available/nextcloud.conf - dest: /etc/apache2/sites-enabled/nextcloud.conf - state: link +- name: "Common | Aktiviere Apache-Seitenkonfiguration" + ansible.builtin.command: + cmd: a2ensite nextcloud.conf + creates: /etc/apache2/sites-enabled/nextcloud.conf notify: reload apache -- name: "common | Kopiere PHP-CLI-Konfiguration" - copy: +- name: "Common | Kopiere PHP-CLI-Konfiguration" + ansible.builtin.copy: src: ../roles/nextcloud/files/30-sao-nextcloud.ini dest: "/etc/php/{{ php_version.stdout }}/mods-available/sao-nextcloud.ini" + mode: 0644 -- name: "common | Aktiviere PHP-CLI-Konfiguration" - file: +- name: "Common | Aktiviere PHP-CLI-Konfiguration" + ansible.builtin.file: src: "/etc/php/{{ php_version.stdout }}/mods-available/sao-nextcloud.ini" dest: "/etc/php/{{ php_version.stdout }}/cli/conf.d/30-sao-nextcloud.ini" state: link -- name: "common | Ermittle letzte Version" - shell: +- name: "Common | Ermittle letzte Version" + ansible.builtin.shell: cmd: curl -sL "{{ nextcloud_github_api_url }}" | jq -r ".tag_name" | cut -d 'v' -f2 changed_when: false register: latest_version -- name: "common | Kopiere Update-Skript" - template: +- name: "Common | Kopiere Update-Skript" + ansible.builtin.template: src: ../roles/nextcloud/templates/nextcloud-updater.j2 dest: "/usr/local/bin/nextcloud-updater" mode: 0755