From 23d8252f5f5c1d4e278c1b2decb2b3a31d3c2571 Mon Sep 17 00:00:00 2001 From: Bombar Maxime Date: Sun, 19 Apr 2020 19:57:55 +0200 Subject: [PATCH] [re2oapi] Improve documentation. --- lookup_plugins/re2oapi.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lookup_plugins/re2oapi.py b/lookup_plugins/re2oapi.py index 3e047916..b4a87fc7 100644 --- a/lookup_plugins/re2oapi.py +++ b/lookup_plugins/re2oapi.py @@ -21,10 +21,20 @@ sys.path.append('./lookup_plugins/') from re2oapi import Re2oAPIClient - class LookupModule(LookupBase): """ - If terms = dnszones then this module queries the re2o api and returns the list of all dns zones + If terms = dnszones then this module queries the re2o api and returns the list of all dns zones. + + + Usage: + + The following play will use the debug module to output all the zone names managed by crans. + + - hosts: sputnik.adm.crans.org + vars: + dnszones: "{{ lookup('re2oapi', 'dnszones', api_hostname='intranet.crans.org') }}" + tasks: + - debug: var=dnszones """