Merge "Add ZooKeeper module to kolla-ansible"
This commit is contained in:
commit
ba01401a1b
docker/kolla-ansible
@ -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 }}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user