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 print_matches is set, I expect the non-empty matches list in the result -- instead it kinda-sorta appears in the msg string.
When print_matches is omitted, I expect there to be no matches list in the result at all, because documentation says so.
If the matches are listed -- which makes sense, since I do request content: text -- the values for each TR should not be null, in my opinion. I'm trying to get the entire rows so as to be able to manipulate them further...
Actual Results
Though matches were found -- and are listed in msg, the actual matches part is empty:
Summary
Revamping from ansible/ansible#55051
The documentation of the XML-module is incorrect about the
matches
andprint_match
parts:print_match
is set, thematches
part of the returned dict may be empty, even when matches are found.print_match
is not set, thematches
part may be returned -- not empty -- when thecontent
is requested, contrary to the documentation.xpath
expression.Issue Type
Bug Report
Component Name
xml
Ansible Version
Community.general Version
Configuration
OS / Environment
Target: Amazon Linux 2023
Steps to Reproduce
Run the below mini-playbook as
ansible-playbook test.yml
Expected Results
print_matches
is set, I expect the non-emptymatches
list in the result -- instead it kinda-sorta appears in the msg string.print_matches
is omitted, I expect there to be nomatches
list in the result at all, because documentation says so.content: text
-- the values for each TR should not benull
, in my opinion. I'm trying to get the entire rows so as to be able to manipulate them further...Actual Results
Though matches were found -- and are listed in
msg
, the actualmatches
part is empty:Code of Conduct
The text was updated successfully, but these errors were encountered: