summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2016-09-26 13:23:17 -0500
committerJames Cammarata <jimi@sngx.net>2016-09-26 13:23:17 -0500
commit47326e8454eb1f94383f936d630da3de6e6da399 (patch)
treed94a0f48eb4d9624378232bcc8a6ef9562d95cd8
parent362b682f1c20144313fd173baba0b4f0350b3574 (diff)
downloadansible-issue_16116_remove_restriction_pending_declarations.tar.gz
Remove restrictions on pending declarations in INI parsingissue_16116_remove_restriction_pending_declarations
Removes the restrictures previously placed on INI files that they could not reference groups for vars and child groups not defined in the INI file itself. Fixes #16116
-rw-r--r--lib/ansible/inventory/ini.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/ansible/inventory/ini.py b/lib/ansible/inventory/ini.py
index 81c3ec90e4..bbead95a96 100644
--- a/lib/ansible/inventory/ini.py
+++ b/lib/ansible/inventory/ini.py
@@ -170,17 +170,6 @@ class InventoryParser(object):
else:
self._raise_error("Entered unhandled state: %s" % (state))
- # Any entries in pending_declarations not removed by a group declaration
- # above mean that there was an unresolved forward reference. We report
- # only the first such error here.
-
- for g in pending_declarations:
- decl = pending_declarations[g]
- if decl['state'] == 'vars':
- raise AnsibleError("%s:%d: Section [%s:vars] not valid for undefined group: %s" % (self.filename, decl['line'], decl['name'], decl['name']))
- elif decl['state'] == 'children':
- raise AnsibleError("%s:%d: Section [%s:children] includes undefined group: %s" % (self.filename, decl['line'], decl['parent'], decl['name']))
-
# Finally, add all top-level groups as children of 'all'.
# We exclude ungrouped here because it was already added as a child of
# 'all' at the time it was created.