-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloud-wordpress
48 lines (39 loc) · 956 Bytes
/
cloud-wordpress
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- hosts: local
connection: local
roles:
- basis
- backup
- mariadb
- php
- nginx
- wordpress
- checkmk
vars:
users_local: [] #some local users only specific to this node!
users: "{{ users_local + users_admin }}"
fail2ban_activate_modules:
- sshd
- nginx
# Websites
web_sites: "{{ wp_web_sites }}"
# Databases
db_configs: "{{ web_sites | json_query('[*].db') }}"
# Nginx
nginx_conf_http_local:
- |
upstream php {
server unix:/run/php/php{{ php_version }}-fpm.sock;
}
nginx_conf_http: "{{ nginx_conf_http_local }}"
# Backup
backup_dbs:
- "{{ db_configs | json_query('[*].{type: type, name: name}') }}"
backup_targets:
db: "{{ backup_dbs | flatten }}"
file:
- "/app/wordpress"
- "/etc/letsencrypt"
vars_files:
- "group_vars/environments.yaml"
- "group_vars/wordpress.yaml"