Skip to content

Commit

Permalink
Merge pull request #52 from veger/debian_package_support
Browse files Browse the repository at this point in the history
Debian package support
  • Loading branch information
ernestas-poskus authored Oct 24, 2016
2 parents 625ad03 + 186dd75 commit de19430
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ zookeeper_autopurge_snapRetainCount: 10

data_dir: /var/lib/zookeeper
log_dir: /var/log/zookeeper
zookeeper_dir: /opt/zookeeper-{{zookeeper_version}}
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

# List of dict (i.e. {zookeeper_hosts:[{host:,id:},{host:,id:},...]})
Expand Down
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ zookeeper_autopurge_snapRetainCount: 10

data_dir: /var/lib/zookeeper
log_dir: /var/log/zookeeper
zookeeper_dir: /opt/zookeeper-{{zookeeper_version}}
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
Expand Down
4 changes: 2 additions & 2 deletions tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
- zookeeperd

- name: Overwrite myid file.
template: src=myid.j2 dest=/etc/zookeeper/conf/myid force="{{ zookeeper_force_myid }}"
template: src=myid.j2 dest={{zookeeper_conf_dir}}/conf/myid force="{{ zookeeper_force_myid }}"
tags: deploy
notify:
- Restart zookeeper

- name: Overwrite default config file
template: src=zoo.cfg.j2 dest=/etc/zookeeper/conf/zoo.cfg
template: src=zoo.cfg.j2 dest={{zookeeper_conf_dir}}/conf/zoo.cfg
tags: deploy
notify:
- Restart zookeeper
4 changes: 2 additions & 2 deletions tasks/common-config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
- name: Configure zookeeper-env.sh
template: src=zookeeper-env.sh.j2 dest={{ zookeeper_dir }}/conf/zookeeper-env.sh owner=zookeeper group=zookeeper
template: src=zookeeper-env.sh.j2 dest={{ zookeeper_conf_dir }}/conf/zookeeper-env.sh owner=zookeeper group=zookeeper
tags: deploy
notify:
- Restart zookeeper
when: zookeeper_env is defined and zookeeper_env|length > 0

- name: Update the log4j config with saner production values
template: src=log4j.properties.j2 dest={{ zookeeper_dir }}/conf/log4j.properties
template: src=log4j.properties.j2 dest={{ zookeeper_conf_dir }}/conf/log4j.properties
tags: deploy
notify:
- Restart zookeeper
Expand Down

0 comments on commit de19430

Please sign in to comment.