Native YAML (#3573)
This commit is contained in:
parent
dfb6861a94
commit
53448af053
1 changed files with 22 additions and 5 deletions
|
@ -64,19 +64,36 @@ author: "Trey Perry (@treyperry)"
|
|||
|
||||
EXAMPLES = """
|
||||
# Creating or updating a znode with a given value
|
||||
- action: znode hosts=localhost:2181 name=/mypath value=myvalue state=present
|
||||
- znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
value: myvalue
|
||||
state: present
|
||||
|
||||
# Getting the value and stat structure for a znode
|
||||
- action: znode hosts=localhost:2181 name=/mypath op=get
|
||||
- znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
op: get
|
||||
|
||||
# Listing a particular znode's children
|
||||
- action: znode hosts=localhost:2181 name=/zookeeper op=list
|
||||
- znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /zookeeper
|
||||
op: list
|
||||
|
||||
# Waiting 20 seconds for a znode to appear at path /mypath
|
||||
- action: znode hosts=localhost:2181 name=/mypath op=wait timeout=20
|
||||
- znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
op: wait
|
||||
timeout: 20
|
||||
|
||||
# Deleting a znode at path /mypath
|
||||
- action: znode hosts=localhost:2181 name=/mypath state=absent
|
||||
- znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
state: absent
|
||||
"""
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue