Merge "Add ZooKeeper module to kolla-ansible"

This commit is contained in:
Jenkins 2015-12-14 13:32:18 +00:00 committed by Gerrit Code Review
commit ba01401a1b
2 changed files with 5 additions and 4 deletions

View File

@ -49,7 +49,7 @@ RUN mkdir -p /etc/ansible /usr/share/ansible /home/ansible \
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts \
&& 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
{{ include_footer }}

View File

@ -16,7 +16,8 @@
import contextlib
import kazoo
import kazoo.client
import kazoo.exceptions
@contextlib.contextmanager
@ -49,9 +50,9 @@ def main():
zk.get(path)
except kazoo.exceptions.NoNodeError:
if value is None:
zk.create(path)
zk.create(path, makepath=True)
else:
zk.create(path, value=value.encode())
zk.create(path, value=value.encode(), makepath=True)
changed = True
module.exit_json(changed=changed)