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

Also catch AnsibleUndefinedVariable errors when templating vars_files names

Fixes #12449
This commit is contained in:
James Cammarata 2015-09-21 09:32:35 -04:00
parent d851df3b31
commit 8769f03c16

View file

@ -33,7 +33,7 @@ except ImportError:
from ansible import constants as C
from ansible.cli import CLI
from ansible.errors import AnsibleError
from ansible.errors import AnsibleError, AnsibleUndefinedVariable
from ansible.inventory.host import Host
from ansible.parsing import DataLoader
from ansible.plugins.cache import FactCache
@ -238,7 +238,7 @@ class VariableManager:
break
else:
raise AnsibleError("vars file %s was not found" % vars_file_item)
except UndefinedError:
except (UndefinedError, AnsibleUndefinedVariable):
continue
if not C.DEFAULT_PRIVATE_ROLE_VARS: