ansible / ansible.builtin / v2.9.27 / 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.9.27) — module
pip
Install with pip install ansible==2.9.27
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: description: - An operation to perform. Mutually exclusive with state. name: description: - The path of the znode. required: true hosts: description: - A list of ZooKeeper servers (format '[server]:[port]'). required: true state: description: - The state to enforce. Mutually exclusive with op. value: description: - The value assigned to the znode. timeout: default: 300 description: - The amount of time to wait for a node to appear. recursive: default: 'no' description: - Recursively delete node and all its children. type: bool version_added: '2.1' version_added_collection: ansible.builtin