You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When IOS XE Device is in maintenance mode the prompt is not identified correctly and all config fails
This fails using ansible.netcommon.cli_config and cisco.ios.ios_config
I just made 2 simple tasks to reproduce, but issue applies to any config
lab-leaf03#start maintenance
Template default will be applied. Do you want to continue?[confirm]
lab-leaf03(maint-mode)#
lab-leaf03(maint-mode)# << Prompt is now changed
lab-leaf03(maint-mod(config)# < Config prompt is this now
After maintenance mode is stopped everything runs as intended
- name: test stuffignore_errors: yescisco.ios.ios_config:
config:
- hostname lab-leaf03
- name: test stuffansible.netcommon.cli_config:
config:
- hostname lab-leaf03
EXPECTED RESULTS
Able to configure things on device while in maintenance mode
ACTUAL RESULTS
It does not determine correctly which prompt it is in. Instead in enable mode it tries to run end twice to get out. Looks like some regex is not correct somewhere.
TASK [test stuff] **********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
task path: /workspace/ansible-prod/graceful-insert.yml:12
The full traceback is:
File ".ansible/collections/ansible_collections/cisco/ios/plugins/module_utils/network/ios/ios.py", line 61, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File "/usr/local/lib/python3.10/site-packages/ansible/module_utils/connection.py", line 200, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [lab-leaf03]: FAILED! => changed=false
invocation:
module_args:
after: null
backup: false
backup_options: null
before: null
config:
- hostname lab-leaf03
defaults: false
diff_against: null
diff_ignore_lines: null
intended_config: null
lines: null
match: line
multiline_delimiter: '@'
parents: null
replace: line
running_config: '[''hostname lab-leaf03'']'
save_when: never
src: null
msg: |-
end
end
^
% Invalid input detected at '^' marker.
lab-leaf03(maint-mode)#
The text was updated successfully, but these errors were encountered:
SUMMARY
When IOS XE Device is in maintenance mode the prompt is not identified correctly and all config fails
This fails using ansible.netcommon.cli_config and cisco.ios.ios_config
maybe issue in regex here?
cisco.ios/plugins/cliconf/ios.py
Line 628 in b6923ab
ISSUE TYPE
COMPONENT NAME
cisco.ios.ios_config
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
I just made 2 simple tasks to reproduce, but issue applies to any config
lab-leaf03#start maintenance
Template default will be applied. Do you want to continue?[confirm]
lab-leaf03(maint-mode)#
lab-leaf03(maint-mode)# << Prompt is now changed
lab-leaf03(maint-mod(config)# < Config prompt is this now
After maintenance mode is stopped everything runs as intended
EXPECTED RESULTS
Able to configure things on device while in maintenance mode
ACTUAL RESULTS
It does not determine correctly which prompt it is in. Instead in enable mode it tries to run end twice to get out. Looks like some regex is not correct somewhere.
The text was updated successfully, but these errors were encountered: