75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
---
|
|
- name: "common | Apache-Module laden"
|
|
apache2_module:
|
|
name: "{{ item.name }}"
|
|
state: "{{ item.state|default('present') }}"
|
|
loop:
|
|
- { name: env }
|
|
- { name: headers }
|
|
- { name: macro }
|
|
- { name: mpm_prefork, state: absent }
|
|
- { name: mpm_event }
|
|
- { name: proxy_fcgi }
|
|
- { name: setenvif }
|
|
notify: restart apache
|
|
|
|
- name: "common | Apache-Vorlage für Seitenkonfiguration kopieren"
|
|
copy:
|
|
src: ../roles/nextcloud/files/apache_site.conf
|
|
dest: /etc/apache2/sites-available/nextcloud.conf
|
|
|
|
- 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 | Erstelle PHP-FPM-Log-Verzeichnis
|
|
file:
|
|
path: "{{ php_fpm_log_dir }}"
|
|
state: directory
|
|
|
|
- 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
|
|
|
|
- name: "common | Kopiere Template für systemd socket"
|
|
copy:
|
|
src: "../roles/nextcloud/files/systemd/php-fpm@.socket"
|
|
dest: /etc/systemd/system/php-fpm@.socket
|
|
notify:
|
|
- stop php-fpm-socket
|
|
- stop php-fpm-service
|
|
- start php-fpm-socket
|
|
|
|
- name: "common | Kopiere Template für systemd service"
|
|
template:
|
|
src: ../roles/nextcloud/templates/systemd/php-fpm@.service.j2
|
|
dest: /etc/systemd/system/php-fpm@.service
|
|
notify:
|
|
- stop php-fpm-socket
|
|
- stop php-fpm-service
|
|
- start php-fpm-socket
|
|
|
|
- name: "common | Aktiviere systemd Socket und Service"
|
|
systemd:
|
|
name: "{{ item }}"
|
|
enabled: true
|
|
daemon_reload: true
|
|
loop:
|
|
- php-fpm@.socket
|
|
- php-fpm@.service
|
|
|
|
- name: "common | Kopiere Update-Skript"
|
|
template:
|
|
src: ../roles/nextcloud/templates/nextcloud-updater.j2
|
|
dest: "/usr/local/bin/nextcloud-updater"
|
|
mode: 0755
|