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"
|
- name: "apache: {{ instance.domain }}: Seite einrichten"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/apache2/conf-available/nextcloud_sites.conf
|
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"
|
- import_tasks: version.yml
|
||||||
include_tasks: version.yml
|
- import_tasks: gateway.yml
|
||||||
tags: version
|
- import_tasks: database.yml
|
||||||
loop: "{{ instances }}"
|
- import_tasks: php.yml
|
||||||
loop_control:
|
- import_tasks: apache.yml
|
||||||
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
|
|
||||||
|
|
||||||
- name: "Nextcloud einrichten"
|
- name: "Nextcloud einrichten"
|
||||||
include_tasks: nextcloud.yml
|
include_tasks: nextcloud.yml
|
||||||
tags: nextcloud
|
|
||||||
loop: "{{ instances }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: instance
|
|
||||||
when: nc_is_installed.stat.exists == False
|
when: nc_is_installed.stat.exists == False
|
||||||
|
|
||||||
- name: "Hotfixes installieren"
|
- import_tasks: fixes.yml
|
||||||
include_tasks: fixes.yml
|
|
||||||
tags: fixes
|
|
||||||
loop: "{{ instances }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: instance
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: "Redis Aktiviere Socket"
|
- name: "redis: Aktiviere Socket"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/redis/redis.conf
|
path: /etc/redis/redis.conf
|
||||||
regexp: '^# unixsocket /var/run/redis/redis-server.sock'
|
regexp: '^# unixsocket /var/run/redis/redis-server.sock'
|
||||||
line: 'unixsocket /var/run/redis/redis-server.sock'
|
line: 'unixsocket /var/run/redis/redis-server.sock'
|
||||||
|
|
||||||
- name: "Redis Berechtigungen"
|
- name: "redis: Socket-Berechtigungen stetzen"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/redis/redis.conf
|
path: /etc/redis/redis.conf
|
||||||
regexp: '^# unixsocketperm 700'
|
regexp: '^# unixsocketperm 700'
|
||||||
|
|
Loading…
Reference in a new issue