-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsite.yml
39 lines (35 loc) · 4.11 KB
/
site.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
---
#
# Playbook to install the ELK stack + Beats on MacOS
#
- name: Install Elastic Stack components on MacOS
hosts: localhost
vars:
version: "{{ tag }}"
repo_base_url: https://artifacts.elastic.co/downloads
base_install_dir: '{{ lookup("env", "ES_INSTALL_HOME") }}'
run_option: "{{ run_option }}"
tasks:
# Check the install path is set
- { assert: { that: base_install_dir != '', fail_msg: "env var ES_INSTALL_HOME must be set to a valid path", success_msg: "Installation directory: {{ base_install_dir }}/{{ version }} " } }
# Install
- { include_role: { name: install }, vars: { product: elasticsearch, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-elasticsearch" }
- { include_role: { name: install }, vars: { product: logstash, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-logstash" }
- { include_role: { name: install }, vars: { product: kibana, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-kibana" }
- { include_role: { name: install }, vars: { product: apm-server, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-apm-server" }
- { include_role: { name: install }, vars: { product: metricbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-metricbeat" }
- { include_role: { name: install }, vars: { product: filebeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-filebeat" }
# Add these back in if you like
# - { include_role: { name: install }, vars: { product: packetbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-packetbeat" }
# - { include_role: { name: install }, vars: { product: heartbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-heartbeat" }
# - { include_role: { name: install }, vars: { product: auditbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "install-all" or run_option == "install-auditbeat" }
# Remove
- { include_role: { name: remove }, vars: { product: elasticsearch, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-elasticsearch" }
- { include_role: { name: remove }, vars: { product: logstash, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-logstash" }
- { include_role: { name: remove }, vars: { product: kibana, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-kibana" }
- { include_role: { name: remove }, vars: { product: apm-server, product_family: elk, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-apm-server" }
- { include_role: { name: remove }, vars: { product: metricbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-metricbeat" }
# - { include_role: { name: remove }, vars: { product: filebeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-filebeat" }
# - { include_role: { name: remove }, vars: { product: packetbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-packetbeat" }
# - { include_role: { name: remove }, vars: { product: heartbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-heartbeat" }
# - { include_role: { name: remove }, vars: { product: auditbeat, product_family: beats, target_os: darwin-x86_64 }, when: run_option == "remove-all" or run_option == "remove-auditbeat" }