diff --git a/lib/ansible/module_utils/netcfg.py b/lib/ansible/module_utils/netcfg.py index 20a3d3e681..6f6bbee6e1 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