Closed juhoffma closed 8 years ago
@juhoffma, I ran into this myself. What I found out reading xml, was that I needed to pass in the namespaces as a map vs a list or an array.
An example from my vars/main.yml:
xpath_namespaces: {x: 'https://domain.com/blah/blah_svc', soap: 'http://schemas.xmlsoap.org/soap/envelope/'}
I then reference the xpath_namespaces
variable as such:
xml:
file: "/tmp/auth_response.xml"
xpath: "//soap:Body/ud:GetAuthResponse/ud:GetAuthResult/ud:authorization_response/ud:error_description"
namespaces: "{{xpath_namespaces}}"
content: 'text'
I have the following XML Document from which I am trying to replace the user-name and password elements of a specific section. This is my source XML File
and this is my task configuration within ansible
in vars I defined:
and the task is configured like:
But when I try to run the task I get:
which seems like an odd error to me