- name: execute action rpc
netconf_rpc:
rpc: action
xmlns: "urn:ietf:params:xml:ns:yang:1"
content: |
<server xmlns="urn:example:server-farm">
<name>apache-1</name>
<reset>
<reset-at>2014-07-29T13:42:00Z</reset-at>
</reset>
</server>
This task will send below XML RPC to remote Netconf server which is similar to that mentioned in RFC 7950
Can a playbook achieve the following tasks?
1) query the node and get all of the node names or a subset of the node names
2) for each target node name that is returned, "execute" an action on it
3) if result is fail, quit (fail); otherwise go to the next action for the next node
I guess the sequence of node names that is returned in step 1 will need to be meaningful in order to ensure the right action is applied to the right node.
Alternatively, step 2 can look for a match on the first part of the node name (a string), and then execute the appropriate action for the matching prefix.
Is this feasible?
Thanks again
-Steve B