Since action is a netconf RPC defined in RFC 7950 it can be executed using
Ansible netconf_rpc module.
- 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
<?xml version="1.0" encoding="UTF-8"?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:4c1aba18-f7dc-4937-a2b9-019cbea5cc4d">
<action xmlns="urn:ietf:params:xml:ns:yang:1">
<server xmlns="urn:example:server-farm">
<name>apache-1</name>
<reset>
<reset-at>2014-07-29T13:42:00Z</reset-at>
</reset>
</server>
</action>
</nc:rpc>
Hope this helps!
Regards,
Ganesh
On Thursday, 3 January 2019 00:53:47 UTC+5:30, [email protected] wrote:
>
> Hi
> Ansible supports netconf-rpc module allowing RPC operations to NETCONF
> devices
> Does Ansible also support actions to NETCONF devices?
>
> From RFC 7950:
>
> The difference between an action and an rpc is that an action is tied
> to a node in the datastore, whereas an rpc is not. When an action is
> invoked, the node in the datastore is specified along with the name
> of the action and the input parameters.
>
> Thank you
> Regards
> Steve
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3c7d71ae-1e6d-49a9-8481-0001750baff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.