The section filter does not exist on IOS 12.2(53r) #51845
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
On IOS 12.2(53r) and probably others
| section <keyword>
doesn't exist leading to the below failurefatal: [XXXXXXXXXXXXXXXXXX]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_QIulr4/ansible_module_ios_user.py\", line 409, in <module>\n main()\n File \"/tmp/ansible_QIulr4/ansible_module_ios_user.py\", line 382, in main\n have = map_config_to_obj(module)\n File \"/tmp/ansible_QIulr4/ansible_module_ios_user.py\", line 242, in map_config_to_obj\n data = get_config(module, flags=['| section username'])\n File \"/tmp/ansible_QIulr4/ansible_modlib.zip/ansible/module_utils/network/ios/ios.py\", line 117, in get_config\n File \"/tmp/ansible_QIulr4/ansible_modlib.zip/ansible/module_utils/connection.py\", line 149, in __rpc__\nansible.module_utils.connection.ConnectionError: show running-config | section username\r\n ^\r\n% Invalid input detected at '^' marker.\r\n\r\nXXXXXXXXXXXXXXXXXXXX#\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
A simple change to
| include username
fixes this.ISSUE TYPE
COMPONENT NAME
ios_user
ADDITIONAL INFORMATION
This is a simple compatibility change to allow the
ios_user
module to work onIOS 12.2(53r)
The below is an example from
12.2(53r)
The below is an example from a device supporting
| section <keyword>