-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathrestart.yml
74 lines (65 loc) · 1.46 KB
/
restart.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
---
# Restart Configuration
#
- hosts: all
tasks:
- name: determine interface
set_fact: ipv4_address="{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}"
# Restart zookeeper
##
- hosts: zookeepers
tasks:
- name: restarting zookeepers
service: name=zookeeper-server state=restarted
tags:
- zookeepers
# Restart journalnodes
##
- hosts: journalnodes
tasks:
- name: restarting journalnodes
service: name=hadoop-hdfs-journalnode state=restarted
tags:
- journalnodes
# Restart HDFS masters
##
- hosts: namenodes
tasks:
- name: restarting namenodes
service: name=hadoop-hdfs-namenode state=restarted
tags:
- namenodes
# Restart HDFS datanodes
##
- hosts: datanodes
tasks:
- name: restarting datanodes
service: name=hadoop-hdfs-datanode state=restarted
tags:
- datanodes
# Restart Spark
##
- hosts: sparkmasters
tasks:
- name: stop masters
service: name=spark-master state=restarted
tags:
- sparkmasters
- name: start masters
service: name=spark-master state=restarted
tags:
- sparkmasters
- hosts: sparkworkers
tasks:
- name: restart workers
service: name=spark-worker state=restarted
tags:
- sparkworkers
# Restart Elasticsearch
##
- hosts: elasticsearch
tasks:
- name: restart elasticsearch
service: name=elasticsearch state=restarted
tags:
- elasticsearch