mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user