From 97c6389d6250e70e9aa4f9c701291d504c888c8a Mon Sep 17 00:00:00 2001 From: machilde Date: Thu, 5 May 2016 00:36:22 -0500 Subject: [PATCH] Fixed issue with parents havings depth of 3+ on add method of NetworkConfig --- lib/ansible/module_utils/netcfg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/netcfg.py b/lib/ansible/module_utils/netcfg.py index ff1d138c23..743614004f 100644 --- a/lib/ansible/module_utils/netcfg.py +++ b/lib/ansible/module_utils/netcfg.py @@ -259,6 +259,8 @@ class NetworkConfig(object): config.append(line) if parent: parent.children.append(line) + if parent.parents: + line.parents.append(*parent.parents) line.parents.append(parent) parent = line offset += self.indent