-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsite.yaml
137 lines (121 loc) · 3.99 KB
/
site.yaml
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
129
130
131
132
133
134
135
136
137
---
- name: Preparing Mata Elang Host
hosts: all
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
handlers:
- name: Import handlers
ansible.builtin.import_tasks:
file: handlers/main.yml
tasks:
- name: Gather the package facts
ansible.builtin.package_facts:
manager: apt
- name: Set Timezone to local
become: true
community.general.timezone:
name: "{{ timezone }}"
- name: Check if Docker rootfull already installed
ansible.builtin.stat:
path: /usr/bin/docker
register: docker_command_exists
- name: Install Docker Binary
ansible.builtin.include_tasks:
file: tasks/docker/install-docker-rootfull.yml
when: not docker_command_exists.stat.exists and
('docker-ce' not in ansible_facts.packages or 'docker' not in ansible_facts.packages) and offline_mode is true
- name: Install Docker (using online repository)
ansible.builtin.include_tasks:
file: tasks/docker/install-repos.yml
when: offline_mode is false
- name: "Mata Elang: Install Mosquitto"
hosts: mosquitto
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
tasks:
- name: Check if docker-compose.yml file already exists
ansible.builtin.stat:
path: ~/mosquitto/docker-compose.yml
register: mosquitto_compose_file
- name: Include install-mosquitto.yml
ansible.builtin.include_tasks:
file: tasks/install-mosquitto.yml
when: not mosquitto_compose_file.stat.exists or (force is defined and force is true)
- name: "Mata Elang: Install Kafka"
hosts: kafka
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
tasks:
- name: Check if docker-compose.yml file already exists
ansible.builtin.stat:
path: ~/kafka/docker-compose.yml
register: kafka_compose_file
- name: Include install-kafka.yml
ansible.builtin.include_tasks:
file: tasks/install-kafka.yml
when: not kafka_compose_file.stat.exists or (force is defined and force is true)
- name: "Mata Elang: Install Hadoop"
hosts: hadoop
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
tasks:
- name: Check if hadoop folder already exists
ansible.builtin.stat:
path: ~/hadoop/bin/hdfs
register: hadoop_compose_file
- name: Include install-hadoop.yml
ansible.builtin.include_tasks:
file: tasks/install-hadoop.yml
when: not hadoop_compose_file.stat.exists or (force is defined and force is true)
- name: "Mata Elang: Install Spark"
hosts: spark
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
tasks:
- name: Check if docker-compose.yml file already exists
ansible.builtin.stat:
path: ~/spark/docker-compose.yml
register: spark_compose_file
- name: Include install-spark.yml
ansible.builtin.include_tasks:
file: tasks/install-spark.yml
when: not spark_compose_file.stat.exists or (force is defined and force is true)
- name: "Mata Elang: Install OpenSearch"
hosts: opensearch
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
tasks:
- name: Check if docker-compose.yml file already exists
ansible.builtin.stat:
path: ~/opensearch/docker-compose.yml
register: opensearch_compose_file
- name: Include install-opensearch.yml
ansible.builtin.include_tasks:
file: tasks/install-opensearch.yml
when: not opensearch_compose_file.stat.exists or (force is defined and force is true)
- name: "Mata Elang: Install Sensor"
hosts: sensor
gather_facts: true
vars_files:
- defaults/main.yml
- vars/main.yml
tasks:
- name: Check if docker-compose.yml file already exists
ansible.builtin.stat:
path: ~/sensor/docker-compose.yml
register: sensor_compose_file
- name: Include install-sensor.yml
ansible.builtin.include_tasks:
file: tasks/install-sensor.yml