I have an JBoss domain.xml file im trying to manipulate with win_xml:
`
…
When I try to modify the heap size attribute above using win_xml with this play:
- name: Test modifying XML
win_xml:
path: e:\jboss-eap-6.4\XXXXXXX\configuration\domain.xml
xpath: ‘/domain/server-groups/server-group/jvm/heap’
attribute: ‘size’
fragment: ‘123m’
type: attribute
However, I get an exception that looks like its coming from powershell "You cannot call a method on a null-valued expression
`
“exception”: “You cannot call a method on a null-valued expression.\r\nAt line:204 char:5\r\n+ [bool]$add = !$node.HasAttribute($attribute) -Or ($node.$attribut …\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: ( , ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : InvokeMethodOnNull\r\n\r\nScriptStackTrace:\r\nat , : line 204\r\n”,
“msg”: “Unhandled exception while executing module: You cannot call a method on a null-valued expression.”,
“_ansible_no_log”: false,
“changed”: false
}
`
Anyone see my problem? I checked the xpath using Notepad++ xml tools plugin and it seems correct. Scratchin my head