removing deepcopy as it does not work

it cannot  handle deep crossreferenced objects
need to find alternative approach.
This commit is contained in:
Brian Coca 2017-10-24 09:55:28 -04:00 committed by Brian Coca
parent 725ae96e1b
commit 506e6a0b2d

View file

@ -24,8 +24,6 @@ import os
import re import re
import itertools import itertools
from copy import deepcopy
from ansible import constants as C from ansible import constants as C
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
from ansible.inventory.data import InventoryData from ansible.inventory.data import InventoryData
@ -260,11 +258,7 @@ class InventoryManager(object):
if plugin.verify_file(source): if plugin.verify_file(source):
try: try:
# in case plugin fails 1/2 way we dont want partial inventory # in case plugin fails 1/2 way we dont want partial inventory
inventory = deepcopy(self._inventory) plugin.parse(self._inventory, self._loader, source, cache=cache)
plugin.parse(inventory, self._loader, source, cache=cache)
# plugin worked! so lets use the more complete inventory
self._inventory = inventory
parsed = True parsed = True
display.vvv('Parsed %s inventory source with %s plugin' % (to_native(source), plugin_name)) display.vvv('Parsed %s inventory source with %s plugin' % (to_native(source), plugin_name))
break break