Skip to content

Commit

Permalink
Merge pull request #48 from ernestas-poskus/features/do_not_overwrite…
Browse files Browse the repository at this point in the history
…_zoo_myid_unless_stated

Do not overwrite Zookeeper myid unless stated
  • Loading branch information
ernestas-poskus authored Sep 20, 2016
2 parents 8829ac4 + d82afa4 commit 51df52c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ zookeeper_hosts:

# 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
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ zookeeper_hosts:

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

# Controls Zookeeper myid generation
zookeeper_force_myid: yes
2 changes: 1 addition & 1 deletion tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- zookeeperd

- name: Overwrite myid file.
template: src=myid.j2 dest=/etc/zookeeper/conf/myid
template: src=myid.j2 dest=/etc/zookeeper/conf/myid force="{{ zookeeper_force_myid }}"
tags: deploy
notify:
- Restart zookeeper
Expand Down
2 changes: 1 addition & 1 deletion tasks/tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- "{{log_dir}}"

- name: Write myid file.
template: src=myid.j2 dest={{data_dir}}/myid owner=zookeeper group=zookeeper
template: src=myid.j2 dest={{data_dir}}/myid owner=zookeeper group=zookeeper force="{{ zookeeper_force_myid }}"
tags: deploy
notify:
- Restart zookeeper
Expand Down

0 comments on commit 51df52c

Please sign in to comment.