ansible-role-nextcloud/tasks/common.yml

57 lines
1.7 KiB
YAML
Raw Normal View History

---
- name: "common | Apache-Module laden"
apache2_module:
name: "{{ item.name }}"
state: "{{ item.state|default('present') }}"
loop:
- { name: env }
- { name: expires }
- { name: headers }
- { name: macro }
- { name: mpm_event }
- { name: mpm_prefork, state: absent }
- { name: proxy_fcgi }
- { name: setenvif }
notify: restart apache
- name: "common | Apache-Konfiguration für NC-Seiten"
file:
path: /etc/apache2/conf-available/nextcloud_sites.conf
state: touch
- name: "common | Apache-Vorlage für Seitenkonfiguration kopieren"
template:
src: ../roles/nextcloud/templates/apache_site.conf.j2
dest: /etc/apache2/sites-available/nextcloud.conf
2021-08-23 15:39:15 +02:00
- name: "common | Apache-Seitenkonfiguration aktivieren"
file:
src: /etc/apache2/sites-available/nextcloud.conf
dest: /etc/apache2/sites-enabled/nextcloud.conf
state: link
notify: reload apache
- name: "common | Kopiere PHP-CLI-Konfiguration"
copy:
src: ../roles/nextcloud/files/30-sao-nextcloud.ini
dest: "/etc/php/{{ php_version.stdout }}/mods-available/sao-nextcloud.ini"
- name: "common | Aktiviere PHP-CLI-Konfiguration"
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
2021-08-18 21:08:44 +02:00
- name: "common | Ermittle letzte Version"
shell:
cmd: curl -sL "{{ nextcloud_github_api_url }}" | jq -r ".tag_name" | cut -d 'v' -f2
warn: false
changed_when: false
register: latest_version
- name: "common | Kopiere Update-Skript"
2021-08-18 21:08:44 +02:00
template:
src: ../roles/nextcloud/templates/nextcloud-updater.j2
dest: "/usr/local/bin/nextcloud-updater"
2021-08-18 21:08:44 +02:00
mode: 0755