Merge pull request #9 from skvidal/master

use logger to track all events run via ansible on the remote host.
This commit is contained in:
Michael DeHaan 2012-02-25 06:58:32 -08:00
commit 2c5d5a328b
3 changed files with 21 additions and 5 deletions

View file

@ -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' ],