forked from mrlesmithjr/ansible-es-filebeat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaybook.yml
42 lines (39 loc) · 917 Bytes
/
playbook.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
---
- hosts: all
become: true
vars:
- pri_domain_name: vagrant.local
roles:
tasks:
- name: updating /etc/hosts
lineinfile:
dest: /etc/hosts
regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
state: present
with_items: groups['all']
- hosts: es
become: true
vars:
- es_allow_remote_connections: true
- pri_domain_name: vagrant.local
roles:
- role: ansible-elasticsearch
- role: ansible-elk-kibana
tasks:
- hosts: logstash
become: true
vars:
- pri_domain_name: vagrant.local
roles:
- role: ansible-logstash
tasks:
- hosts: filebeat
become: true
vars:
- pri_domain_name: vagrant.local
roles:
- ansible-apache2
- ansible-logstash-filebeat
- ansible-mysql
tasks: