diff --git a/changelogs/fragments/60569-plugins-netconf-ce.yml b/changelogs/fragments/60569-plugins-netconf-ce.yml new file mode 100644 index 00000000000..9d6ce194173 --- /dev/null +++ b/changelogs/fragments/60569-plugins-netconf-ce.yml @@ -0,0 +1,2 @@ +bugfixes: + - plugins-netconf-ce - to get attribute 'set-id' from rpc-reply. diff --git a/lib/ansible/plugins/netconf/ce.py b/lib/ansible/plugins/netconf/ce.py index 24066b13e02..ef436d5229a 100644 --- a/lib/ansible/plugins/netconf/ce.py +++ b/lib/ansible/plugins/netconf/ce.py @@ -167,6 +167,9 @@ class Netconf(NetconfBase): @ensure_connected def get(self, *args, **kwargs): try: + if_rpc_reply = kwargs.pop('if_rpc_reply', False) + if if_rpc_reply: + return self.m.get(*args, **kwargs).xml return self.m.get(*args, **kwargs).data_xml except RPCError as exc: raise Exception(to_xml(exc.xml))