ensure-zookeeper: add use_tmpfs parameter

This change enables using the ensure-zookeeper role in environments
where mounting a filesystem is not allowed.

Change-Id: I1a05a895a45896eca91dccfcfc85aeb1a58689ff
This commit is contained in:
Tristan Cacqueray 2021-03-30 22:34:43 +00:00
parent b5ffcea04d
commit 23cc3d4184
3 changed files with 7 additions and 0 deletions

View File

@ -13,3 +13,8 @@ Install and start zookeeper using the upsteam release.
:default: false
Setup zookeeper tls certificates.
.. zuul:rolevar:: zookeeper_use_tmpfs
:default: true
Setup a tmpfs for data directory.

View File

@ -3,4 +3,5 @@ _zookeeper_latest_version: "3.6.1"
_zookeeper_install_version: "{% if zookeeper_version == 'latest' %}{{ _zookeeper_latest_version }}{% else %}{{ zookeeper_version }}{% endif %}"
zookeeper_use_tls: false
zookeeper_use_tmpfs: true
zookeeper_ca_dir: "/opt/zookeeper/ca"

View File

@ -35,6 +35,7 @@
fstype: tmpfs
opts: "nodev,nosuid,size=500M"
src: "none"
when: zookeeper_use_tmpfs
become: true
- name: Setup Zookeeper config file