Skip to content

Commit

Permalink
Backport #38194 for 2.5 - include_vars error fix (#38225)
Browse files Browse the repository at this point in the history
* Don't pass keyword args as positional, include file_name. Fixes #38190 (#38194)

(cherry picked from commit ddf937d)

* Add changelog for #38194
  • Loading branch information
sivel authored and samdoran committed Apr 5, 2018
1 parent 6356633 commit 8277989
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/include_vars_error_hang_fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- include_vars - Call DataLoader.load with the correct signature to prevent hang on error processing (https://github.com/ansible/ansible/pull/38194)
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/include_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _load_files(self, filename, validate_extensions=False):
data = to_text(b_data, errors='surrogate_or_strict')

self.show_content = show_content
data = self._loader.load(data, show_content)
data = self._loader.load(data, file_name=filename, show_content=show_content)
if not data:
data = dict()
if not isinstance(data, dict):
Expand Down

0 comments on commit 8277989

Please sign in to comment.