install_zookeeper.yml
1.18 KB
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
- name: create the directory of the node
file:
path: /appli/zookeeper/data
state: directory
recurse: yes
# owner: zookeeper
group:
- name: create the file of the id of the node
template:
src: ./templates/myid.j2
dest: /appli/zookeeper/data/myid
#owner: zookeeper
#group: zookeeper
mode: 0700
- name: Download zookeeper package
get_url:
url: https://dlcdn.apache.org/zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz
dest: /opt/apache-zookeeper-3.6.3-bin.tar.gz
- name: unzip the zk package
unarchive:
src: /opt/apache-zookeeper-3.6.3-bin.tar.gz
dest: /opt
remote_src: yes
- name: copy paste bin folder
copy:
src: /opt/apache-zookeeper-3.6.3-bin/bin
dest: /appli/zookeeper/
remote_src: yes
become: yes
- name: copy paste lib folder
copy:
src: /opt/apache-zookeeper-3.6.3-bin/lib
dest: /appli/zookeeper/
remote_src: yes
- name: copy paste config files
copy:
src: "{{item}}"
dest: /appli/zookeeper/conf/
remote_src: yes
with_items:
- "/opt/apache-zookeeper-3.6.3-bin/conf/configuration.xsl"
- "/opt/apache-zookeeper-3.6.3-bin/conf/log4j.properties"