-
Notifications
You must be signed in to change notification settings - Fork 0
/
lamp_stack.yml
53 lines (41 loc) · 923 Bytes
/
lamp_stack.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
---
- name: Wait for hosts
hosts: basic-setup
gather_facts: False
tasks:
- name: "Wait for hosts to come up"
local_action: wait_for port=22 host="{{ inventory_hostname }}" delay=10
when: need_wait is defined
- name: "Let the ssh daemon catch up"
pause: seconds=15
when: need_wait is defined
- name: Setup basic commands
hosts: basic-setup
remote_user: root
tasks:
- name: Refresh repository
shell: zypper --no-gpg-checks ref
- name: Install webservers
hosts: webserver
remote_user: root
roles:
- webserver
- name: Install balancer
hosts: balancer
remote_user: root
roles:
- balancer
- name: Install database server
hosts: database
remote_user: root
vars_files:
- "ansible.vars"
roles:
- database
- name: Install wordpress
hosts: webserver
remote_user: root
roles:
- wordpress
vars_files:
- "ansible.vars"