-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
39 lines (33 loc) · 1 KB
/
main.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
---
- name: Bring up EC2 instances, security groups
hosts: all
connection: local
vars_files:
- vars/credentials.yml
- defaults/main.yml
roles:
- ec2-dynamic-inventory
environment:
ANSIBLE_HOST_KEY_CHECKING: False
- name: Bring up ELB and attach instances to it
hosts: launched
gather_facts: False
vars_files:
- vars/credentials.yml
- defaults/main.yml
roles:
- ec2-loadbalancers
- name: Install elasticsearch, logstash and kibana
hosts: launched
become: True
vars_files:
- vars/credentials.yml
- defaults/main.yml
vars:
ansible_user: "{{ _ansible_user }}"
ansible_ssh_private_key_file: "{{ _ansible_ssh_private_key_file }}"
roles:
- ansible-role-java
- { role: ansible-role-elasticsearch, when: "'elasticsearch' in hostvars[inventory_hostname].type" }
- { role: ansible-role-logstash, when: "'logstash' in hostvars[inventory_hostname].type " }
- { role: ansible-role-kibana, when: "'kibana' in hostvars[inventory_hostname].type" }