Skip to content

Commit

Permalink
Donot start zookeeper at installation
Browse files Browse the repository at this point in the history
Donot start zookeeper at installation.
It will be started after proper perms/ownership is set for /var/lib/zookeeper.

Change-Id: I1d58c909be13ead2fe33138d93c4c6535ddfdc1d
Partial-Bug: #1720728
  • Loading branch information
Santosh Gupta committed Nov 9, 2017
1 parent 27d4b58 commit 1f88786
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions playbooks/roles/zookeeper/files/policy-rc.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
if [ "${1}" = "--quiet" ]; then
name="$2"
else
name="$1"
fi
sensitive_services_list=/etc/sensitive_services
if [ -e $sensitive_services_list ]; then
grep -x "$name" "$sensitive_services_list" && exit 101
fi
exit 0
6 changes: 6 additions & 0 deletions playbooks/roles/zookeeper/tasks/install/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- name: Avoid zookeeper starting as a part of installation
lineinfile: dest=/etc/sensitive_services line=zookeeper state=present create=yes

- name: install policy-rc.d to selectively disable automated service start by apt
copy: src=policy-rc.d dest=/usr/sbin/policy-rc.d mode=0755

- name: Install zookeeper with apt
include: apt.yml
when: zookeeper_debian_apt_install
Expand Down

0 comments on commit 1f88786

Please sign in to comment.