community / community.general / 0.2.1 / module / znode Create, delete, retrieve, and update znodes using ZooKeeper Authors: Trey Perry (@treyperry)community.general.znode (0.2.1) — module
Install with ansible-galaxy collection install community.general:==0.2.1
collections: - name: community.general version: 0.2.1
Create, delete, retrieve, and update znodes using ZooKeeper.
- name: Creating or updating a znode with a given value znode: hosts: 'localhost:2181' name: /mypath value: myvalue state: present
- name: Getting the value and stat structure for a znode znode: hosts: 'localhost:2181' name: /mypath op: get
- name: Listing a particular znode's children znode: hosts: 'localhost:2181' name: /zookeeper op: list
- name: Waiting 20 seconds for a znode to appear at path /mypath znode: hosts: 'localhost:2181' name: /mypath op: wait timeout: 20
- name: Deleting a znode at path /mypath znode: hosts: 'localhost:2181' name: /mypath state: absent
- name: 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