summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormachilde <machilde@ubuntu-dev.bntlab.com>2016-05-05 00:36:22 -0500
committerPeter Sprygada <psprygada@ansible.com>2016-05-18 09:31:54 -0400
commit41f45336a9b71b311f0ca3ed07df077a4d46996d (patch)
tree77f6bca26d79d9ec99be1f5a4b313153af630845
parent710a96956eaece69ff9cfb6381801b1994897348 (diff)
downloadansible-41f45336a9b71b311f0ca3ed07df077a4d46996d.tar.gz
Fixed issue with parents havings depth of 3+ on add method of NetworkConfig
-rw-r--r--lib/ansible/module_utils/netcfg.py2
1 files changed, 2 insertions, 0 deletions
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