1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix network config line diff ignore (#43924)

* If config is added in form of lines add
  capability to ignore confgiure lines given as input
  in task
This commit is contained in:
Ganesh Nalawade 2018-08-22 19:40:09 +05:30 committed by GitHub
parent 5f953d1129
commit 522dd923c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -374,6 +374,10 @@ class NetworkConfig(object):
# global config command
if not parents:
for line in lines:
# handle ignore lines
if ignore_line(line):
continue
item = ConfigLine(line)
item.raw = line
if item not in self.items:
@ -399,6 +403,10 @@ class NetworkConfig(object):
# add child objects
for line in lines:
# handle ignore lines
if ignore_line(line):
continue
# check if child already exists
for child in ancestors[-1]._children:
if child.text == line: