Skip to content
Snippets Groups Projects
Commit ba01401a authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add ZooKeeper module to kolla-ansible"

parents 1cd8aab9 77593f4c
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ RUN mkdir -p /etc/ansible /usr/share/ansible /home/ansible \ ...@@ -49,7 +49,7 @@ RUN mkdir -p /etc/ansible /usr/share/ansible /home/ansible \
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts \ && echo 'localhost ansible_connection=local' > /etc/ansible/hosts \
&& useradd --user-group ansible --groups kolla && useradd --user-group ansible --groups kolla
COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py /usr/share/ansible/ COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py kolla_zookeeper.py /usr/share/ansible/
COPY ansible.cfg /home/ansible/.ansible.cfg COPY ansible.cfg /home/ansible/.ansible.cfg
{{ include_footer }} {{ include_footer }}
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
import contextlib import contextlib
import kazoo import kazoo.client
import kazoo.exceptions
@contextlib.contextmanager @contextlib.contextmanager
...@@ -49,9 +50,9 @@ def main(): ...@@ -49,9 +50,9 @@ def main():
zk.get(path) zk.get(path)
except kazoo.exceptions.NoNodeError: except kazoo.exceptions.NoNodeError:
if value is None: if value is None:
zk.create(path) zk.create(path, makepath=True)
else: else:
zk.create(path, value=value.encode()) zk.create(path, value=value.encode(), makepath=True)
changed = True changed = True
module.exit_json(changed=changed) module.exit_json(changed=changed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment