Skip to content

Commit

Permalink
Do not overwrite Zookeeper myid unless stated
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestas-poskus committed Sep 20, 2016
1 parent 9487315 commit d47ab8b
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: true
```
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: true
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 d47ab8b

Please sign in to comment.