From edb968305092e246bfc0525e9a90f25496b31a5a Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Sat, 25 Feb 2012 01:00:37 -0500 Subject: [PATCH] touch up the example API code --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e683493662a..34380744e94 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,8 @@ track of which hosts were successfully contacted seperately from hosts that had communication problems. The format of the return, if successful, is entirely up to the module. - import ansible + + import ansible.runner runner = ansible.runner.Runner( pattern='*', module_name='inventory', @@ -91,6 +92,7 @@ is entirely up to the module. ) data = runner.run() +data is a dictionary: { 'contacted' : { 'xyz.example.com' : [ 'any kind of datastructure is returnable' ],