Umstrukturierung: Trenne allgemeine von loop-Aufgaben
This commit is contained in:
parent
34fc716ff0
commit
b04d8b705b
4 changed files with 30 additions and 68 deletions
|
@ -1,14 +1,4 @@
|
|||
---
|
||||
- name: "apache: {{ instance.domain }}: Module laden"
|
||||
apache2_module:
|
||||
state: present
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- macro
|
||||
- proxy_fcgi
|
||||
- setenvif
|
||||
notify: restart apache
|
||||
|
||||
- name: "apache: {{ instance.domain }}: Seite einrichten"
|
||||
lineinfile:
|
||||
path: /etc/apache2/conf-available/nextcloud_sites.conf
|
||||
|
|
22
tasks/apache_common.yml
Normal file
22
tasks/apache_common.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
- name: "apache_common: Module laden"
|
||||
apache2_module:
|
||||
state: present
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- macro
|
||||
- proxy_fcgi
|
||||
- setenvif
|
||||
notify: restart apache
|
||||
|
||||
- name: "apache_common: Vorlage für Seitenkonfiguration kopieren"
|
||||
copy:
|
||||
src: roles/nextcloud/files/apache_site.conf
|
||||
dest: /etc/apache2/sites-available/nextcloud.conf
|
||||
|
||||
- name: "apache_common: Seitenkonfiguration aktivieren"
|
||||
file:
|
||||
src: /etc/apache2/sites-available/nextcloud.conf
|
||||
dest: /etc/apache2/sites-enabled/nextcloud.conf
|
||||
state: link
|
||||
notify: reload apache
|
|
@ -1,62 +1,12 @@
|
|||
---
|
||||
- name: "Versionen prüfen"
|
||||
include_tasks: version.yml
|
||||
tags: version
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
|
||||
- import_tasks: packages.yml
|
||||
|
||||
- name: "Gateway einrichten"
|
||||
include_tasks: gateway.yml
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
|
||||
- name: "Datenbank einrichten"
|
||||
include_tasks: database.yml
|
||||
tags: database
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
|
||||
- name: "PHP-FPM einrichten"
|
||||
include_tasks: php.yml
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
|
||||
- name: "Apache: Vorlage für Seitenkonfiguration kopieren"
|
||||
copy:
|
||||
src: apache_site.conf
|
||||
dest: /etc/apache2/sites-available/nextcloud.conf
|
||||
|
||||
- name: "Webserver einrichten"
|
||||
include_tasks: apache.yml
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
|
||||
- name: "Apache: Seitenkonfiguration aktivieren"
|
||||
file:
|
||||
src: /etc/apache2/sites-available/nextcloud.conf
|
||||
dest: /etc/apache2/sites-enabled/nextcloud.conf
|
||||
state: link
|
||||
|
||||
- import_tasks: redis.yml
|
||||
- import_tasks: version.yml
|
||||
- import_tasks: gateway.yml
|
||||
- import_tasks: database.yml
|
||||
- import_tasks: php.yml
|
||||
- import_tasks: apache.yml
|
||||
|
||||
- name: "Nextcloud einrichten"
|
||||
include_tasks: nextcloud.yml
|
||||
tags: nextcloud
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
when: nc_is_installed.stat.exists == False
|
||||
|
||||
- name: "Hotfixes installieren"
|
||||
include_tasks: fixes.yml
|
||||
tags: fixes
|
||||
loop: "{{ instances }}"
|
||||
loop_control:
|
||||
loop_var: instance
|
||||
- import_tasks: fixes.yml
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
- name: "Redis Aktiviere Socket"
|
||||
- name: "redis: Aktiviere Socket"
|
||||
lineinfile:
|
||||
path: /etc/redis/redis.conf
|
||||
regexp: '^# unixsocket /var/run/redis/redis-server.sock'
|
||||
line: 'unixsocket /var/run/redis/redis-server.sock'
|
||||
|
||||
- name: "Redis Berechtigungen"
|
||||
- name: "redis: Socket-Berechtigungen stetzen"
|
||||
lineinfile:
|
||||
path: /etc/redis/redis.conf
|
||||
regexp: '^# unixsocketperm 700'
|
||||
|
|
Loading…
Reference in a new issue