-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelastic-compose-data.yml
63 lines (58 loc) · 1.87 KB
/
elastic-compose-data.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
- name: se_s
become: true
hosts: all
remote_user: eadm
tasks:
- name: Creates directory
file:
path: /data/elasticsearch
state: directory
owner: 1000
group: 1000
mode: 0700
- name: Creates directory
file:
path: /data/elasticsearch/log
state: directory
owner: 1000
group: 1000
mode: 0700
- name: Creates directory
file:
path: /home/eadm/elasticsearch
state: directory
owner: 1000
group: 1000
mode: 0700
- name: create compose
copy:
content: "
version: '2.2'\n
services:\n
\ \ {{ ansible_hostname }}:\n
\ \ \ \ image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1\n
\ \ \ \ container_name: {{ ansible_hostname }}\n
\ \ \ \ network_mode: \"host\"\n
\ \ \ \ environment:\n
\ \ \ \ \ - node.name={{ ansible_hostname }}\n
\ \ \ \ \ - ELASTIC_PASSWORD= limon\n
\ \ \ \ \ - cluster.name=escluster\n
\ \ \ \ \ - network.publish_host={{ ansible_host }}\n
\ \ \ \ \ - cluster.initial_master_nodes=x.x.x.x,x.x.x.x\n
\ \ \ \ \ - discovery.seed_hosts=x.x.x.x,x.x.x.x\n
\ \ \ \ \ - bootstrap.memory_lock=true\n
\ \ \ \ \ - network.host=0.0.0.0\n
\ \ \ \ \ - node.master=false\n
\ \ \ \ \ - node.data=true\n
\ \ \ \ \ - ES_JAVA_OPTS=-Xms16g -Xmx16g\n
\ \ \ \ ulimits:\n
\ \ \ \ \ \ memlock:\n
\ \ \ \ \ \ \ soft: -1\n
\ \ \ \ \ \ \ hard: -1\n
\ \ \ \ volumes:\n
\ \ \ \ \ - /data/elasticsearch:/usr/share/elasticsearch/data\n
\ \ \ \ \ - /data/log/elasticsearch:/var/log/elasticsearch\n
\ \ \ \ ports:\n
\ \ \ \ \ - 9200:9200\n
\ \ \ \ \ - 9300:9300\n"
dest: "/home/eadm/elasticsearch/docker-compose.yml"