mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -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
|
@ -126,26 +126,12 @@ commands:
|
|||
sample:
|
||||
- hostname ios01
|
||||
- ip domain name eng.ansible.com
|
||||
start:
|
||||
description: The time the job started
|
||||
returned: always
|
||||
type: str
|
||||
sample: "2016-11-16 10:38:15.126146"
|
||||
end:
|
||||
description: The time the job ended
|
||||
returned: always
|
||||
type: str
|
||||
sample: "2016-11-16 10:38:25.595612"
|
||||
delta:
|
||||
description: The time elapsed to perform all operations
|
||||
returned: always
|
||||
type: str
|
||||
sample: "0:00:10.469466"
|
||||
"""
|
||||
import re
|
||||
|
||||
from ansible.module_utils.local import LocalAnsibleModule
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ios import get_config, load_config
|
||||
from ansible.module_utils.ios import ios_argument_spec, check_args
|
||||
from ansible.module_utils.network_common import ComplexList
|
||||
|
||||
_CONFIGURED_VRFS = None
|
||||
|
@ -364,11 +350,17 @@ def main():
|
|||
state=dict(choices=['present', 'absent'], default='present')
|
||||
)
|
||||
|
||||
module = LocalAnsibleModule(argument_spec=argument_spec,
|
||||
supports_check_mode=True)
|
||||
argument_spec.update(ios_argument_spec)
|
||||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
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