ansible / ansible.builtin / v2.4.4.0-1 / module / znode Create, delete, retrieve, and update znodes using ZooKeeper | "added in version" 2.0 of ansible.builtin" Authors: Trey Perry (@treyperry) preview | supported by communityansible.builtin.znode (v2.4.4.0-1) — module
pip
Install with pip install ansible==2.4.4.0.post1
Create, delete, retrieve, and update znodes using ZooKeeper.
# Creating or updating a znode with a given value - znode: hosts: 'localhost:2181' name: /mypath value: myvalue state: present
# Getting the value and stat structure for a znode - znode: hosts: 'localhost:2181' name: /mypath op: get
# Listing a particular znode's children - znode: hosts: 'localhost:2181' name: /zookeeper op: list
# Waiting 20 seconds for a znode to appear at path /mypath - znode: hosts: 'localhost:2181' name: /mypath op: wait timeout: 20
# Deleting a znode at path /mypath - znode: hosts: 'localhost:2181' name: /mypath state: absent
# Creating or updating a znode with a given value on a remote Zookeeper - znode: hosts: 'my-zookeeper-node:2181' name: /mypath value: myvalue state: present delegate_to: 127.0.0.1
op: default: None description: - An operation to perform. Mutually exclusive with state. required: false name: description: - The path of the znode. required: true hosts: description: - A list of ZooKeeper servers (format '[server]:[port]'). required: true state: default: None description: - The state to enforce. Mutually exclusive with op. required: false value: default: None description: - The value assigned to the znode. required: false timeout: default: 300 description: - The amount of time to wait for a node to appear. required: false recursive: default: false description: - Recursively delete node and all its children. required: false version_added: '2.1' version_added_collection: ansible.builtin