I have an JBoss domain.xml file im trying to manipulate with win_xml:

<domain>
...
    <server-groups>
        <server-group name="sandbox" profile="full-ha">
            <jvm name="default">
                <heap size="8192m" max-size="8192m"/>
                <permgen max-size="384m"/>
            </jvm>
            <socket-binding-group ref="full-ha-sockets"/>
            <deployments>
                <deployment name="XXXXXXXXXXX.ear" runtime-name=
"XXXXXXXXXXX.ear"/>
            </deployments>
        </server-group>
    </server-groups>


</domain>


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 <ScriptBlock>, <No file>: 
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

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2f64b3f1-ae5b-4a5b-8281-c78981ece725%40googlegroups.com.

Reply via email to