-
Notifications
You must be signed in to change notification settings - Fork 1
/
CLC_Ensure-OFR-Server-Groups-Exist-in-Control-playbook.yml
128 lines (109 loc) · 4.47 KB
/
CLC_Ensure-OFR-Server-Groups-Exist-in-Control-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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
################################################################################
# description: Ensure the Operations Flight Recorder (OFR) server groups exist in Control at CenturyLink Cloud
# usage: ansible-playbook CLC_Ensure-OFR-Server-Groups-Exist-in-Control-playbook.yml --extra-vars 'DC=YourDCGoesHere'
# author: Ernest G. Wilson II <ErnestGWilsonII@gmail.com> (https://github.com/ernestgwilsonii)
# license: MIT
################################################################################
# Ansible Playbook options
# REF: http://docs.ansible.com/ansible/playbooks.html
#####################################################
- name: Ensure the Operations Flight Recorder (OFR) server groups exist in Control
hosts: localhost
gather_facts: False
connection: local
tasks:
# clc_group - Create/delete Server Groups at Centurylink Cloud
# REF: http://docs.ansible.com/ansible/clc_group_module.html
############################################################
- name: Ensure the OFR servers group exists in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR"
description: "Operations Flight Recorder"
state: present
register: clc
- name: Ensure the OFR-NGINX server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-NGINX"
description: "NGINX in HA with Keepalived group"
parent: "OFR"
state: present
- name: Ensure the OFR-Logstash server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-Logstash"
description: "Logstash group"
parent: "OFR"
state: present
- name: Ensure the OFR-Kafka server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-Kafka"
description: "Kafka group"
parent: "OFR"
state: present
- name: Ensure the OFR-Elasticsearch server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-Elasticsearch"
description: "Elasticsearch group"
parent: "OFR"
state: present
- name: Ensure the OFR-ElasticsearchClientNodes server group exists below the Elasticsearch group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-ElasticsearchClientNodes"
description: "Elasticsearch Client Nodes group"
parent: "OFR-Elasticsearch"
state: present
- name: Ensure the OFR-ElasticsearchMasterNodes server group exists below the Elasticsearch group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-ElasticsearchMasterNodes"
description: "Elasticsearch Master Nodes group"
parent: "OFR-Elasticsearch"
state: present
- name: Ensure the OFR-ElasticsearchDataNodes server group exists below the Elasticsearch group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-ElasticsearchDataNodes"
description: "Elasticsearch Data Nodes group"
parent: "OFR-Elasticsearch"
state: present
- name: Ensure the OFR-Kibana server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-Kibana"
description: "Kibana group"
parent: "OFR"
state: present
- name: Ensure the OFR-Graylog server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-Graylog"
description: "Graylog group"
parent: "OFR"
state: present
- name: Ensure the OFR-MongoDB server group exists below the OFR-Graylog group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-MongoDB"
description: "MongoDB Cluster for Graylog group"
parent: "OFR-Graylog"
state: present
- name: Ensure the OFR-StatsD server group exists below the OFR group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-StatsD"
description: "StatsD group"
parent: "OFR"
state: present
- name: Ensure the OFR-Graphite server group exists below the OFR-StatsD group in Control in "{{DC}}"
clc_group:
location: "{{DC}}"
name: "OFR-Graphite"
description: "Graphite for StatsD group"
parent: "OFR-StatsD"
state: present