From 53448af053c09c2782b5c811076ad8df1ab6aec8 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Thu, 1 Dec 2016 10:54:07 +0000 Subject: [PATCH] Native YAML (#3573) --- .../modules/extras/clustering/znode.py | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/extras/clustering/znode.py b/lib/ansible/modules/extras/clustering/znode.py index 6d01b869c58..0e36c0d994b 100644 --- a/lib/ansible/modules/extras/clustering/znode.py +++ b/lib/ansible/modules/extras/clustering/znode.py @@ -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: