install_zookeeper.yml 1.18 KB
- 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"