Skip to content

Commit

Permalink
systemd: Do not start zookeeper on installation
Browse files Browse the repository at this point in the history
We donot want zookeeper to start at installtion.
policy-rc.d not working for systemd in ubuntu-1604.
Adding separate command.

Change-Id: I54b182b031227ccb877b9df841a32cbed6ffa9af
Closes-Bug: #1732406
  • Loading branch information
Santosh Gupta committed Nov 20, 2017
1 parent 5f73360 commit a6da013
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playbooks/roles/zookeeper/tasks/install/Debian.yml
Expand Up @@ -5,6 +5,10 @@
- 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: disable auto start zookeeper service in case of systemd
shell: systemctl mask zookeeper
when: contrail_service_mgr == 'systemd'

- name: Install zookeeper with apt
include: apt.yml
when: zookeeper_debian_apt_install
Expand Down
5 changes: 5 additions & 0 deletions playbooks/roles/zookeeper/tasks/setup.yml
Expand Up @@ -8,6 +8,11 @@
include: configure.yml
tags: [configure, zookeeper.configure]

- name: Unmask zookeeper service now in case of systemd
shell: systemctl unmask zookeeper
when: contrail_service_mgr == 'systemd'
tags: [service, zookeeper.service]

- name: Start zookeeper service
service: name=zookeeper state=started enabled=yes
tags: [service, zookeeper.service]
Expand Down

0 comments on commit a6da013

Please sign in to comment.