ansible-role-nextcloud/tasks/common.yml

59 lines
1.8 KiB
YAML
Raw Normal View History

---
2022-12-31 13:43:36 +01:00
- name: "Common | Aktiviere Apache-Module"
ansible.builtin.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
2022-12-31 13:43:36 +01:00
- name: "Common | Erstelle Apache-Konfiguration für NC-Seiten"
ansible.builtin.file:
path: /etc/apache2/conf-available/nextcloud_sites.conf
state: touch
2022-12-31 13:43:36 +01:00
mode: 0644
2022-12-31 13:43:36 +01:00
- 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
2022-12-31 13:43:36 +01:00
mode: 0644
2021-08-23 15:39:15 +02:00
2022-12-31 13:43:36 +01:00
- name: "Common | Aktiviere Apache-Seitenkonfiguration"
ansible.builtin.command:
cmd: a2ensite nextcloud.conf
creates: /etc/apache2/sites-enabled/nextcloud.conf
notify: reload apache
2022-12-31 13:43:36 +01:00
- 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"
2022-12-31 13:43:36 +01:00
mode: 0644
2022-12-31 13:43:36 +01:00
- 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
2021-08-18 21:08:44 +02:00
2022-12-31 13:43:36 +01:00
- 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
2022-12-31 13:43:36 +01:00
- name: "Common | Kopiere Update-Skript"
ansible.builtin.template:
src: ../roles/nextcloud/templates/nextcloud-updater.j2
dest: "/usr/local/bin/nextcloud-updater"
2021-08-18 21:08:44 +02:00
mode: 0755