mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 06:31:23 -07:00
updates ios modules to support persistent socket (#21258)
* updates all ios modules to support persistent socket * adds ios action plugin to connect to device * adds exec_command() to ios shared module * fixes ios_config and ios_template local action * update all unit test cases * adds base test module for ios module testing
This commit is contained in:
parent
8bf69411d9
commit
7f1c43e597
19 changed files with 493 additions and 737 deletions
|
@ -142,8 +142,9 @@ import re
|
|||
|
||||
from functools import partial
|
||||
|
||||
from ansible.module_utils.local import LocalAnsibleModule
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ios import load_config, get_config
|
||||
from ansible.module_utils.ios import ios_argument_spec, check_args
|
||||
from ansible.module_utils.netcfg import NetworkConfig
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
|
@ -327,14 +328,20 @@ def main():
|
|||
state=dict(default='present', choices=['present', 'absent'])
|
||||
)
|
||||
|
||||
argument_spec.update(ios_argument_spec)
|
||||
|
||||
mutually_exclusive = [('name', 'vrfs')]
|
||||
|
||||
module = LocalAnsibleModule(argument_spec=argument_spec,
|
||||
mutually_exclusive=mutually_exclusive,
|
||||
supports_check_mode=True)
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
mutually_exclusive=mutually_exclusive,
|
||||
supports_check_mode=True)
|
||||
|
||||
result = {'changed': False}
|
||||
|
||||
warnings = list()
|
||||
check_args(module, warnings)
|
||||
result['warnings'] = warnings
|
||||
|
||||
want = map_params_to_obj(module)
|
||||
have = map_config_to_obj(module)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue