Forget what I said - I misread. The win_xml module doesn't have a
'namespaces' option.
I mixed it up with the regular xml module.


On Wed, 1 Apr 2020 at 07:18, Dick Visser <[email protected]> wrote:

> Hi
>
> While that does work, it looks like the xpath expression is flattening too
> much with all those wildcards.
> The correct way would be to provide the actual namespace, this is
> supported by the module:
>
>
> https://docs.ansible.com/ansible/latest/modules/xml_module.html#parameter-namespaces
>
> Dick
>
>
>
> On Wed, 1 Apr 2020 at 03:27, Dave York <[email protected]> wrote:
>
>> I figured this out.  Turned out that my xml was using a different
>> namespace? I had to follow guidance I found on stackoverflow:
>>
>> https://stackoverflow.com/questions/5239685/xml-namespace-breaking-my-xpath
>>
>> So my play now looks like this (and works):
>>   tasks:
>>   - name: Test modifying XML
>>     win_xml:
>>       path: e:\jboss-eap-6.4\XXXXXXXXX\configuration\domain.xml
>>       xpath:
>> '/*[local-name()="domain"]/*[local-name()="server-groups"]/*[local-name()="server-group"]/*[local-name()="jvm"]/*[local-name()="heap"]'
>>       attribute: 'size'
>>       fragment: '123m'
>>       type: attribute
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/4c0d8605-8923-4346-bb06-e252c1a18142%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/4c0d8605-8923-4346-bb06-e252c1a18142%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from a mobile device - please excuse the brevity, spelling and
> punctuation.
>


-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwOMsyjYYmjKwyNo9OoTr1nJXSGGR5n%3DP1GjTHTWUodP-Q%40mail.gmail.com.

Reply via email to