2020-02-03 11:00:27 +00:00
|
|
|
---
|
2021-05-10 13:29:38 +00:00
|
|
|
- name: Verify Ansible versions
|
2021-04-09 06:18:59 +00:00
|
|
|
hosts: all
|
|
|
|
tags: always
|
2021-05-10 13:29:38 +00:00
|
|
|
become: false
|
|
|
|
run_once: true
|
2021-04-09 06:18:59 +00:00
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- local_action: command ./versioncheck.py
|
|
|
|
changed_when: false
|
|
|
|
|
2020-02-03 11:00:27 +00:00
|
|
|
- name: Configure ElasticSearch servers
|
2021-02-09 19:27:13 +00:00
|
|
|
become: true
|
2022-02-03 20:38:55 +00:00
|
|
|
hosts: logs.nimbus
|
2020-02-03 11:00:27 +00:00
|
|
|
roles:
|
2021-01-20 19:35:33 +00:00
|
|
|
- role: swap-file
|
|
|
|
tags: swap-file
|
2020-02-03 11:00:27 +00:00
|
|
|
- role: origin-certs
|
|
|
|
tags: origin-certs
|
|
|
|
- role: elasticsearch
|
|
|
|
tags: elasticsearch
|
|
|
|
- role: elasticsearch-hq
|
|
|
|
tags: elasticsearch-hq
|
|
|
|
- role: oauth-proxy
|
|
|
|
tags: oauth-proxy
|
|
|
|
- role: nginx
|
|
|
|
tags: nginx
|
|
|
|
- role: open-ports
|
|
|
|
tags: open-ports
|
2020-02-05 12:39:43 +00:00
|
|
|
|
|
|
|
- name: Configure ElasticSearch servers
|
2021-02-09 19:27:13 +00:00
|
|
|
become: true
|
2022-02-03 20:38:55 +00:00
|
|
|
hosts: dash.nimbus
|
2020-02-05 12:39:43 +00:00
|
|
|
pre_tasks:
|
|
|
|
- name: Fetch available elasticsearch nodes
|
|
|
|
uri:
|
2022-02-03 20:38:55 +00:00
|
|
|
url: '{{ consul_catalog_url }}/service/elasticsearch?dc={{ es_lb_cluster_dc }}&tag={{ es_lb_cluster_name }}'
|
2020-02-05 12:39:43 +00:00
|
|
|
register: es_services
|
|
|
|
- name: Extract ElasticSearch hostnames
|
|
|
|
set_fact:
|
|
|
|
# we also need to remove our own node from the list
|
|
|
|
es_lb_master_nodes: |
|
|
|
|
{{ es_services.json
|
|
|
|
| rejectattr("Node", "equalto", hostname)
|
|
|
|
| list
|
|
|
|
| json_query(
|
|
|
|
'[].{
|
|
|
|
name: Node,
|
|
|
|
addr: ServiceAddress,
|
|
|
|
port: to_string(ServiceMeta.cluster_port)
|
|
|
|
}') }}
|
|
|
|
roles:
|
|
|
|
- role: elasticsearch-lb
|
|
|
|
tags: elasticsearch-lb
|
2020-02-07 13:11:17 +00:00
|
|
|
- role: logclean-job
|
|
|
|
tags: logclean-job
|
2020-02-05 12:39:43 +00:00
|
|
|
- role: kibana
|
|
|
|
tags: kibana
|
|
|
|
- role: oauth-proxy
|
|
|
|
tags: oauth-proxy
|
|
|
|
- role: origin-certs
|
|
|
|
tags: origin-certs
|
|
|
|
- role: nginx
|
|
|
|
tags: nginx
|
|
|
|
- role: open-ports
|
|
|
|
tags: open-ports
|