mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-20 11:04:00 -07:00
Rename 'successful' to 'contacted' ...
This commit is contained in:
parent
530e54b3e4
commit
7be8d134c9
2 changed files with 9 additions and 5 deletions
10
README.md
10
README.md
|
@ -75,7 +75,10 @@ Run a module by name with arguments
|
|||
API Example
|
||||
===========
|
||||
|
||||
The API is simple and returns basic datastructures.
|
||||
The API is simple and returns basic datastructures. Ansible will keep
|
||||
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
|
||||
runner = ansible.Runner(
|
||||
|
@ -86,17 +89,18 @@ The API is simple and returns basic datastructures.
|
|||
data = runner.run()
|
||||
|
||||
{
|
||||
'successful' : {
|
||||
'contacted' : {
|
||||
'xyz.example.com' : [ 'any kind of datastructure is returnable' ],
|
||||
'foo.example.com' : [ '...' ]
|
||||
},
|
||||
'failed' : {
|
||||
'dark' : {
|
||||
'bar.example.com' : [ 'failure message' ]
|
||||
}
|
||||
}
|
||||
|
||||
Additional options to Runner include the number of forks, hostname
|
||||
exclusion pattern, library path, arguments, and so on.
|
||||
|
||||
Read the source, it's not complicated.
|
||||
|
||||
Patterns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue