diff --git a/changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml b/changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml new file mode 100644 index 0000000000..68e3387dc5 --- /dev/null +++ b/changelogs/fragments/56976-update ce_ntp.py and remove the root tag name to find all nodes.yml @@ -0,0 +1,2 @@ +minor_changes: + - update ce_ntp.py and remove the root tag name to find all nodes(https://github.com/ansible/ansible/pull/56976). diff --git a/lib/ansible/modules/network/cloudengine/ce_ntp.py b/lib/ansible/modules/network/cloudengine/ce_ntp.py index ab0dfceeac..cade2e8e6c 100644 --- a/lib/ansible/modules/network/cloudengine/ce_ntp.py +++ b/lib/ansible/modules/network/cloudengine/ce_ntp.py @@ -442,7 +442,7 @@ class Ntp(object): # get all ntp config info root = ElementTree.fromstring(xml_str) - ntpsite = root.findall("data/ntp/ntpUCastCfgs/ntpUCastCfg") + ntpsite = root.findall("ntp/ntpUCastCfgs/ntpUCastCfg") for nexthop in ntpsite: ntp_dict = dict() for ele in nexthop: