adds feature to all modules to be run locally (#18763)

* adds new error AnsibleModuleExit to handle module returns
* adds new action plugin network for attaching connection to network modules
* adds new shared module local to receive connection
* splits out function to update task_args with common updates

This commit provides a mechansim for running local modules that require
a connection object for interative commands tyically implemented for
network devices.  It provides a way to locally import modules (post fork)
and run them using exception handling to exit.
This commit is contained in:
Peter Sprygada
2016-12-15 15:47:29 -05:00
committed by GitHub
parent 066872cdc6
commit 0cef38cf02
4 changed files with 169 additions and 17 deletions

View File

@@ -196,3 +196,8 @@ class AnsibleUndefinedVariable(AnsibleRuntimeError):
class AnsibleFileNotFound(AnsibleRuntimeError):
''' a file missing failure '''
pass
class AnsibleModuleExit(Exception):
''' local module exit '''
def __init__(self, result):
self.result = result