diff --git a/lib/ansible/module_utils/netcfg.py b/lib/ansible/module_utils/netcfg.py index ff1d138c23e..743614004f1 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