-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplaybook.wordpress-example.yml
50 lines (42 loc) · 1.32 KB
/
playbook.wordpress-example.yml
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
49
50
---
- name: provision Debian web server with WordPress
vars:
timezone: 'Europe/Moscow'
remote_user: "{{ user }}"
hosts: all
become: yes
roles:
- role: essentials
tags: essentials
- role: iptables
tags: iptables
- role: nginx
tags: nginx
- role: mysql
tags: mysql
- role: php
tags: php
- role: wordpress
vars:
wordpress_domain: 'example.app.dev'
mysql_database: "{{ mysql_credentials[0].database }}"
mysql_user: "{{ mysql_credentials[0].username }}"
mysql_password: "{{ mysql_credentials[0].password }}"
tags: wordpress
when: mysql_credentials is defined
- role: wordpress
vars:
wordpress_domain: 'site1.app.dev'
mysql_database: "{{ mysql_credentials[1].database }}"
mysql_user: "{{ mysql_credentials[1].username }}"
mysql_password: "{{ mysql_credentials[1].password }}"
tags: wordpress
when: mysql_credentials is defined
- role: wordpress
vars:
wordpress_domain: 'site2.app.dev'
mysql_database: "{{ mysql_credentials[2].database }}"
mysql_user: "{{ mysql_credentials[2].username }}"
mysql_password: "{{ mysql_credentials[2].password }}"
tags: wordpress
when: mysql_credentials is defined