Add support to template myid file

This is needed if you want to setup a zookeeper cluster.

Change-Id: I40d852f3e04866bd28e259ded3c029663b44395d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-12-04 14:06:22 -05:00
parent 6d28399ce5
commit 3558c0987b
5 changed files with 24 additions and 0 deletions

View File

@ -19,6 +19,10 @@ zookeeper_task_manager:
- service
# tasks/config.yaml
zookeeper_file_myid_group: zookeeper
zookeeper_file_myid_mode: 0644
zookeeper_file_myid_owner: zookeeper
zookeeper_file_zoo_conf_group: zookeeper
zookeeper_file_zoo_conf_mode: 0644
zookeeper_file_zoo_conf_owner: zookeeper

View File

@ -21,3 +21,13 @@
owner: "{{ zookeeper_file_zoo_conf_owner }}"
src: "{{ zookeeper_file_zoo_conf_src }}"
register: zookeeper_file_zoo_conf
- name: Install zookeeper myid.
become: yes
template:
dest: "{{ zookeeper_file_myid_dest }}"
group: "{{ zookeeper_file_myid_group }}"
mode: "{{ zookeeper_file_myid_mode }}"
owner: "{{ zookeeper_file_myid_owner }}"
src: "{{ zookeeper_file_myid_src }}"
register: zookeeper_file_myid

View File

@ -0,0 +1,3 @@
# This file is generated by Ansible
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#

View File

@ -27,5 +27,8 @@
---
__zookeeper_package_name: zookeeperd
zookeeper_file_myid_dest: /etc/zookeeper/conf/myid
zookeeper_file_myid_src: etc/zookeeper/conf/myid
zookeeper_file_zoo_conf_dest: /etc/zookeeper/conf/zoo.cfg
zookeeper_file_zoo_conf_src: etc/zookeeper/conf/zoo.cfg

View File

@ -14,6 +14,10 @@
---
__zookeeper_package_name: zookeeper
zookeeper_file_myid_dest: /var/lib/zookeeper/data
# NOTE(pabelanger): Avoid creating a symlink, and point to Debian version.
zookeeper_file_myid_src: etc/zookeeper/conf/myid
zookeeper_file_zoo_conf_dest: /etc/zookeeper/zoo.cfg
# NOTE(pabelanger): Avoid creating a symlink, and point to Debian version.
zookeeper_file_zoo_conf_src: etc/zookeeper/conf/zoo.cfg