Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zookeeper_url split into two vars, Easy to change the download address #1

Open
wants to merge 100 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
e4020b0
supporting RHEL 6 systems
mhamrah Oct 25, 2014
12946df
subtle differences with service for rhel
mhamrah Oct 25, 2014
67ad006
removing enabled from restart block; issue with rhel
mhamrah Oct 25, 2014
a6160aa
reverting ubuntu to use apt-get
mhamrah Oct 26, 2014
f66ffae
using zoo_id as a better variable name for playbooks
mhamrah Oct 27, 2014
b4afe70
centos needs start-foreground
mhamrah Oct 27, 2014
142a6fc
adding meta and version
mhamrah Oct 27, 2014
edff9cc
adding travis config and tests from marathon
mhamrah Oct 30, 2014
83bbab9
Merge pull request #5 from mhamrah/redhat
JasonGiedymin Nov 1, 2014
efb9c63
Add dockerfile, build script, travis, ci folder
JasonGiedymin Mar 8, 2015
fbba1b8
Merge pull request #7 from AnsibleShipyard/docker
JasonGiedymin Mar 8, 2015
9d8833b
Add multi-docker support
JasonGiedymin Mar 9, 2015
6b8d2c5
Merge pull request #8 from AnsibleShipyard/multi-docker
JasonGiedymin Mar 9, 2015
fdb46f2
Removed unneeded Zookeeper restart on every run
ernoaapa May 12, 2015
f96b85d
Merge pull request #10 from ernoaapa/master
JasonGiedymin May 13, 2015
c30bac3
Fixed Zookeeper to restart every time Ansible runs on Debian
ernoaapa Jun 2, 2015
6c18f07
Merge pull request #11 from ernoaapa/fix_debian_service_restart
JasonGiedymin Jun 2, 2015
5daea9d
Support distro with systemd.
Aug 2, 2015
c95d874
Merge pull request #14 from ninthnails/feature/systemd
JasonGiedymin Aug 6, 2015
08305cf
Update version
JasonGiedymin Nov 4, 2015
eb14a88
Merge pull request #17 from AnsibleShipyard/v0.9.0
JasonGiedymin Nov 4, 2015
9075ade
Bump default zookeeper_version to 3.4.7
DavidWittman Dec 3, 2015
bdd552e
Merge pull request #20 from DavidWittman/patch-1
JasonGiedymin Dec 4, 2015
f0209bf
Bump playbook version to 0.9.1
JasonGiedymin Dec 4, 2015
a672723
Merge pull request #21 from AnsibleShipyard/JasonGiedymin-patch-0.9.1
JasonGiedymin Dec 4, 2015
14b335f
Back to version 3.4.6
DavidWittman Jan 13, 2016
0362d69
Merge pull request #22 from DavidWittman/patch-1
JasonGiedymin Jan 14, 2016
2b7c9f6
BYPASS - Update version
JasonGiedymin Jan 14, 2016
d4fc598
Make zookeeper service enabled for RedHat
ernestas-poskus Apr 2, 2016
24c3a25
Merge pull request #28 from ernestas-poskus/features/make_zookeeper_s…
ernestas-poskus May 21, 2016
e3a103b
Allow zookeeper hosts to accept list and hash
ernestas-poskus Jun 1, 2016
06f703c
Merge pull request #29 from ernestas-poskus/features/allow_zookeeper_…
ernestas-poskus Jun 5, 2016
0f909bd
Add Ansible Galaxy webhook
ernestas-poskus Jun 5, 2016
e52041e
Merge pull request #30 from ernestas-poskus/features/add_ansible_gala…
ernestas-poskus Jun 5, 2016
1359081
Refactor into reusable includes (#33)
lhoss Aug 8, 2016
3c48ee7
configurable autopurge for zookeeper snapshots and logs (#37)
lhoss Aug 10, 2016
5106db3
Zookeeper setup using offical tarball (also) on debian/ubuntu (#34)
lhoss Aug 10, 2016
6a9b545
configurable tarball folder (default being /opt/src) (#38)
lhoss Aug 11, 2016
a24b32c
Configurable zookeeper environment vars (#39)
lhoss Aug 12, 2016
0ffa49c
Refactor the service init task into the common include (#40)
lhoss Aug 12, 2016
0c67e5e
Register the zookeeper bin dir in the PATH env variable (#41)
lhoss Aug 12, 2016
b93f36b
Update README according Ansible galaxy (#42)
ernestas-poskus Aug 16, 2016
5b91acf
Add cluster setup README example (#44)
ernestas-poskus Aug 31, 2016
9487315
Features/introduce multi platform travis (#45)
ernestas-poskus Sep 12, 2016
8e808ed
Make zookeeper service enabled
ernestas-poskus Sep 12, 2016
424a072
Update supported platforms list
ernestas-poskus Sep 20, 2016
0e7e782
Add galaxy_tags to meta description
ernestas-poskus Sep 20, 2016
c8259fa
Merge pull request #47 from ernestas-poskus/features/update_supported…
ernestas-poskus Sep 20, 2016
8829ac4
Merge pull request #46 from ernestas-poskus/features/make_zokeeper_se…
ernestas-poskus Sep 20, 2016
d82afa4
Do not overwrite Zookeeper myid unless stated
ernestas-poskus Sep 20, 2016
51df52c
Merge pull request #48 from ernestas-poskus/features/do_not_overwrite…
ernestas-poskus Sep 20, 2016
62d3426
Add custom IP hash key per host
ernestas-poskus Sep 27, 2016
b8f20df
Merge pull request #49 from ernestas-poskus/features/add_custom_ip_ha…
ernestas-poskus Sep 27, 2016
0c2c4ee
added saner production rolling log file options
eladamitpxi Sep 29, 2016
28f43d6
prefixed new vars with zookeeper
eladamitpxi Oct 9, 2016
26a07b0
prefixed new vars with zookeeper
eladamitpxi Oct 9, 2016
625ad03
Merge pull request #51 from PerimeterX/master
ernestas-poskus Oct 11, 2016
2a50167
Make configuration location customizeable
veger Oct 20, 2016
186dd75
Update zookeeper_dir default to support the Debian package default
veger Oct 20, 2016
de19430
Merge pull request #52 from veger/debian_package_support
ernestas-poskus Oct 24, 2016
c92b7a1
Let handler (re)start zookeeper
veger Oct 31, 2016
f8a4c94
Make sure daemon-reload is executed first
veger Oct 31, 2016
90fc631
Merge pull request #54 from veger/order_of_handlers
ernestas-poskus Nov 1, 2016
8d00311
Merge pull request #53 from veger/start_once
ernestas-poskus Nov 1, 2016
e94b489
support a custom zookeeper debian apt repository
lhoss Jan 5, 2017
630606e
more flexible list of optional apt repositories valid for a (subset o…
lhoss Jan 6, 2017
8dd152c
bumped zookeeper_playbook_version
lhoss Jan 6, 2017
844e131
Merge pull request #58 from teralytics/support_custom_zookeeper_debia…
ernestas-poskus Jan 6, 2017
8a5fe7e
Install java8 for test dependencies
ernestas-poskus May 10, 2017
955d80d
Merge pull request #67 from ernestas-poskus/features/install_java_8_f…
ernestas-poskus May 10, 2017
075920e
Remove unused variables
ernestas-poskus Feb 21, 2017
3081f93
Merge pull request #61 from ernestas-poskus/features/remove_unused_va…
ernestas-poskus May 10, 2017
5f31edf
Bump zookeeper to 3.4.9
ernestas-poskus Feb 21, 2017
0c9923d
Merge pull request #62 from ernestas-poskus/features/bump_zookeeper_t…
ernestas-poskus May 10, 2017
9dd3901
Ignore IDEA files.
May 8, 2017
0d958ee
Removing sudo from upstart script.
May 8, 2017
dc54ad7
Adding S3 support.
May 8, 2017
45d1113
Merge pull request #66 from jlm3575/jlm3575/ignore-idea-files
ernestas-poskus May 18, 2017
1f27c7d
Merge pull request #65 from jlm3575/jlm3575/remove-upstart-sudo
ernestas-poskus May 18, 2017
3ac38ed
Merge pull request #64 from jlm3575/jlm3575/s3-support
ernestas-poskus May 18, 2017
80ab62f
Remove 'z' from untar command
dzeban Jun 13, 2017
eb88708
Enable systemd service for Debian 8
dzeban Jun 13, 2017
d57a942
Merge pull request #69 from dzeban/enable-systemd-debian8
ernestas-poskus Jun 15, 2017
bfd932e
Merge pull request #68 from dzeban/tar-remove-z-option
ernestas-poskus Jun 15, 2017
c2ff5c7
Remove .travis specific docker version constraint
ernestas-poskus Jul 24, 2017
769c5e9
Merge pull request #72 from ernestas-poskus/travis/remove_specific_do…
ernestas-poskus Jul 24, 2017
ab6f93b
Bump zookeper version to 3.4.11
ernestas-poskus Dec 15, 2017
92d7c15
Merge pull request #78 from ernestas-poskus/features/bump_zookeeper_v…
ernestas-poskus Dec 15, 2017
fb5b78f
+ restart zookeeper if it's killed/failed
maqdev Nov 26, 2017
7bd414a
Make ZK startup only after network is up
Darwiner Jul 17, 2017
25ade86
Extracted hardcoded zookeeper ports into vars (#77)
RunsFor Dec 17, 2017
a83d4af
Update zookeeper.conf.j2
kknd22 Dec 20, 2017
31a3cab
Merge pull request #80 from kknd22/master
ernestas-poskus Dec 20, 2017
70b42ef
introduce ansible default var max_client_connections to inject maxCli…
Mar 28, 2018
1416185
Merge pull request #81 from emalloy/dev/add_max_cnxns
ernestas-poskus Apr 6, 2018
84c1357
Customize own hostname with a new variable
jordiclariana Apr 5, 2018
87bbce5
Merge pull request #82 from StuartApp/custom_zookeper_hosts
ernestas-poskus Apr 7, 2018
8794291
Require ansible 2.4
ernestas-poskus May 5, 2018
af62793
Bump Zookeeper to 3.14.12
ernestas-poskus May 6, 2018
9dd39a9
Merge pull request #85 from ernestas-poskus/features/require_ansible_2_4
ernestas-poskus May 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ coverage.xml
# Sphinx documentation
docs/_build/

*.iml
68 changes: 68 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
sudo: required

env:
matrix:
- distro: ernestasposkus/centos7
init: /usr/lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
- distro: ernestasposkus/centos6
init: /sbin/init
run_opts: ""
- distro: ernestasposkus/ubuntu1604
init: /lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
- distro: ernestasposkus/ubuntu1404
init: /sbin/init
run_opts: ""

services:
- docker

before_install:
# Pull container.
- 'sudo docker pull ${distro}:latest'

script:
- container_id=$(mktemp)
# Run container in detached state.
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distro}:latest "${init}" > "${container_id}"'

# Inspect docker container
- 'sudo docker inspect $(cat ${container_id})'

# Print ansible version
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible --version'

# Check Ansible host setup
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible all -i "localhost," -c local -m setup'

# Install dependencies
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-galaxy install geerlingguy.java'
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/dependencies.yml'

# Ansible syntax check.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/playbook.yml --syntax-check'

# Test role.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/playbook.yml'

# Test role idempotence.
- idempotence=$(mktemp)
- sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/role_under_test/tests/playbook.yml | tee -a ${idempotence}
- >
tail ${idempotence}
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)

# Test role.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml'

# View container logs
- 'sudo docker logs "$(cat ${container_id})"'

# Clean up.
- 'sudo docker stop "$(cat ${container_id})"'

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
166 changes: 159 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,175 @@
ansible-zookeeper
=================

[![Build Status](https://travis-ci.org/AnsibleShipyard/ansible-zookeeper.svg?branch=master)](https://travis-ci.org/AnsibleShipyard/ansible-zookeeper)

ZooKeeper playbook for Ansible

Support open source!
Installation
-----------

```bash
ansible-galaxy install AnsibleShipyard.ansible-zookeeper
```

Dependencies
------------

Java

- https://github.com/AnsibleShipyard/ansible-java
- https://github.com/geerlingguy/ansible-role-java

Requirements
------------

Ansible version at least 1.6

Role Variables
--------------

```yaml
---
zookeeper_version: 3.4.12
zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz

# Flag that selects if systemd or upstart will be used for the init service:
# Note: by default Ubuntu 15.04 and later use systemd (but support switch to upstart)
zookeeper_debian_systemd_enabled: "{{ ansible_distribution_version|version_compare(15.04, '>=') }}"
zookeeper_debian_apt_install: false
# (Optional:) add custom 'ppa' repositories depending on the distro version (only with debian_apt_install=true)
# Example: to use a community zookeeper v3.4.8 deb pkg for Ubuntu 14.04 (where latest official is v3.4.5)
zookeeper_debian_apt_repositories:
- repository_url: "ppa:ufscar/zookeeper"
distro_version: "14.04"

apt_cache_timeout: 3600
zookeeper_register_path_env: false

client_port: 2181
init_limit: 5
sync_limit: 2
tick_time: 2000
zookeeper_autopurge_purgeInterval: 0
zookeeper_autopurge_snapRetainCount: 10
zookeeper_cluster_ports: "2888:3888"
zookeeper_max_client_connections: 60

data_dir: /var/lib/zookeeper
log_dir: /var/log/zookeeper
zookeeper_dir: /opt/zookeeper-{{zookeeper_version}} # or /usr/share/zookeeper when zookeeper_debian_apt_install is true
zookeeper_conf_dir: {{zookeeper_dir}} # or /etc/zookeeper when zookeeper_debian_apt_install is true
zookeeper_tarball_dir: /opt/src

zookeeper_hosts_hostname: "{{inventory_hostname}}"
# List of dict (i.e. {zookeeper_hosts:[{host:,id:},{host:,id:},...]})
zookeeper_hosts:
- host: "{{zookeeper_hosts_hostname}}" # the machine running
id: 1

# Dict of ENV settings to be written into the (optional) conf/zookeeper-env.sh
zookeeper_env: {}

# Controls Zookeeper myid generation
zookeeper_force_myid: yes
```

Example Playbook
----------------

NOTE: This role requires the following roles:
- ansible-java
```yaml
- name: Installing ZooKeeper
hosts: all
sudo: yes
roles:
- role: AnsibleShipyard.ansible-zookeeper
```

## How to use this playbook?
Example Retrieving Tarball From S3
----------------------------------

```yaml
- name: Installing ZooKeeper
hosts: all
sudo: yes
vars:
zookeeper_archive_s3_bucket: my-s3-bucket
zookeeper_archive_s3_object: my/s3/directory/zookeeper-{{zookeeper_version}}.tar.gz
roles:
- role: AnsibleShipyard.ansible-zookeeper
```

Cluster Example
----------------

```yaml
- name: Zookeeper cluster setup
hosts: zookeepers
sudo: yes
roles:
- role: AnsibleShipyard.ansible-zookeeper
zookeeper_hosts: "{{groups['zookeepers']}}"
```

Assuming ```zookeepers``` is a [hosts group](http://docs.ansible.com/ansible/intro_inventory.html#group-variables) defined in inventory file.

```inventory
[zookeepers]
server[1:3]
```

Custom IP per host group

```
zookeeper_hosts: "
{%- set ips = [] %}
{%- for host in groups['zookeepers'] %}
{{- ips.append(dict(id=loop.index, host=host, ip=hostvars[host]['ansible_default_ipv4'].address)) }}
{%- endfor %}
{{- ips -}}"
```

See this sample [playbook](https://github.com/AnsibleShipyard/ansible-galaxy-roles/blob/master/playbook.yml)
which shows how to use this playbook as well as others. It is part of [ansible-galaxy-roles](https://github.com/AnsibleShipyard/ansible-galaxy-roles) and
serves as a curation (and thus an example) of all our ansible playbooks.

## Our Other Mesos related playbooks
License
-------

The MIT License (MIT)

Copyright (c) 2014 Kien Pham

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


AnsibleShipyard
-------

Our related playbooks

1. [ansible-mesos](https://github.com/AnsibleShipyard/ansible-mesos)
1. [ansible-marathon](https://github.com/AnsibleShipyard/ansible-marathon)
1. [ansible-chronos](https://github.com/AnsibleShipyard/ansible-chronos)
1. [ansible-mesos-docker](https://github.com/AnsibleShipyard/ansible-mesos-docker)
1. [ansible-zookeeper](https://github.com/AnsibleShipyard/ansible-zookeeper)
1. [ansible-zookeeper](https://github.com/AnsibleShipyard/ansible-zookeeper)

Author Information
------------------

@AnsibleShipyard/developers and others.
12 changes: 11 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ Vagrant.configure("2") do |config|
c.vm.box = "centos65-x86_64-20140116"
c.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box"
c.vm.provision "shell" do |s|
s.inline = "/bin/true"
s.inline = "yum install -y nc java-1.7.0-openjdk-devel ansible"
s.privileged = true
end
end

# centos 7
config.vm.define 'centos7' do |c|
c.vm.network "private_network", ip: "192.168.100.4"
c.vm.box = "centos/7"
c.vm.provision "shell" do |s|
s.inline = "yum install -y epel-release; yum install -y nc java-1.7.0-openjdk-devel ansible"
s.privileged = true
end
end
Expand Down
55 changes: 55 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

DOCKERNAME="ansibleshipyard/ansible-zookeeper"
DOCKER_DIR="dockerfiles"
# TAGS=(ubuntu centos)
TAGS=(ubuntu)
CONTEXT=.

usage() {
local tag=$1

echo
echo "To pull it"
echo " docker pull $DOCKERNAME:$tag"
echo
echo "To use this docker:"
echo " docker run -d -P $DOCKERNAME:$tag"
echo
echo "To run in interactive mode for debug:"
echo " docker run -t -i $DOCKERNAME:$tag bash"
echo
}

build() {
local tag=$1

# pushd $tag

# Builds the image
cmd="docker build -f $DOCKER_DIR/$tag/Dockerfile --force-rm -t $DOCKERNAME:$tag $CONTEXT"

echo "Command to execute: [$cmd]"

$cmd

if [ $? == 0 ]; then
echo "$tag build successful!"
usage $tag
return 0
else
return 1
fi;
}

main() {
# pushd $DOCKER_DIR
for tag in ${TAGS[@]}; do
build ${tag}
if [ $? != 0 ]; then
echo "$tag build failed!"
fi;
done
}

main
50 changes: 42 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
---
zookeeper_playbook_version: "0.0.1"
zookeeper_version: 3.4.6
zookeeper_version: 3.4.12
zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz
zookeeper_dir: /opt/zookeeper-{{zookeeper_version}}
zookeeper_data: /var/lib/zookeeper
zookeeper_logs: /var/log/zookeeper

zookeeper_myid: 1
zookeeper_servers:
- { id: 1, host: localhost }
# Flag that selects if systemd or upstart will be used for the init service:
# Note: by default Ubuntu 15.04 and later use systemd (but support switch to upstart)
_ubuntu_1504: "{{ ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare(15.04, '>=') }}"
_debian_8: "{{ ansible_distribution == 'Debian' and ansible_distribution_version|version_compare(8.0, '>=') }}"
zookeeper_debian_systemd_enabled: "{{ _ubuntu_1504 or _debian_8 }}"

zookeeper_debian_apt_install: false
zookeeper_debian_apt_repositories: []
apt_cache_timeout: 3600
zookeeper_register_path_env: false

client_port: 2181
init_limit: 5
sync_limit: 2
tick_time: 2000
zookeeper_autopurge_purgeInterval: 0
zookeeper_autopurge_snapRetainCount: 10
zookeeper_cluster_ports: "2888:3888"
zookeeper_max_client_connections: 60

data_dir: /var/lib/zookeeper
log_dir: /var/log/zookeeper
zookeeper_dir: "{{ zookeeper_debian_apt_install | ternary('/usr/share/zookeeper', '/opt/zookeeper-' + zookeeper_version) }}"
zookeeper_conf_dir: "{{ zookeeper_debian_apt_install | ternary('/etc/zookeeper', zookeeper_dir) }}"
zookeeper_tarball_dir: /opt/src

# Rolling file appender setttings
zookeeper_rolling_log_file_max_size: 10MB
zookeeper_max_rolling_log_file_count: 10

zookeeper_hosts_hostname: "{{inventory_hostname}}"
# List of dict (i.e. {zookeeper_hosts:[{host:,id:},{host:,id:},...]})
zookeeper_hosts:
- host: "{{zookeeper_hosts_hostname}}" # the machine running
id: 1

# Dict of ENV settings to be written into the (optional) conf/zookeeper-env.sh
zookeeper_env: {}

# Controls Zookeeper myid generation
zookeeper_force_myid: yes
6 changes: 5 additions & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
- name: Reload systemctl daemon
command: systemctl daemon-reload
when: ansible_service_mgr == 'systemd'

- name: Restart zookeeper
service: name=zookeeper state=restarted enabled=yes
service: name=zookeeper state=restarted
Loading