infra-the-hive/ansible/main.yml

42 lines
1.5 KiB
YAML

---
- name: Verify Ansible versions
hosts: all
tags: always
become: false
run_once: true
gather_facts: false
tasks:
- local_action: command ./versioncheck.py
changed_when: false
- name: Configure The Hive backend
hosts: thehive-slave
roles:
- { role: swap-file, tags: swap-file }
- { role: open-ports, tags: open-ports }
- { role: cassandra, tags: cassandra }
- { role: elasticsearch, tags: elasticsearch }
- { role: elasticsearch-hq, tags: elasticsearch-hq }
- { role: oauth-proxy, tags: oauth-proxy }
- { role: origin-certs, tags: origin-certs }
- { role: nginx, tags: nginx }
- name: Configure The Hive frontend
hosts: thehive-master
pre_tasks:
- name: Fetch available Cassandra nodes
tags: the-hive
uri: url='{{ consul_catalog_url }}/service/cassandra?service-meta=cluster_name:{{ es_cluster_name }}'
register: cassandra_services
- name: Fetch available ElasticSearch nodes
tags: cortex
uri: url='{{ consul_catalog_url }}/service/elasticsearch?service-meta=cluster_name:{{ cortex_search_cluster_name }}'
register: elasticsearch_services
roles:
- { role: swap-file, tags: swap-file }
- { role: cortex, tags: cortex }
- { role: the-hive, tags: the-hive }
- { role: origin-certs, tags: origin-certs }
- { role: nginx, tags: nginx }
- { role: open-ports, tags: open-ports }