diff --git a/changelogs/fragments/include_vars_error_hang_fix.yaml b/changelogs/fragments/include_vars_error_hang_fix.yaml new file mode 100644 index 0000000000..ec129495f6 --- /dev/null +++ b/changelogs/fragments/include_vars_error_hang_fix.yaml @@ -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) diff --git a/lib/ansible/plugins/action/include_vars.py b/lib/ansible/plugins/action/include_vars.py index 7ef24e9b3a..8897f87af1 100644 --- a/lib/ansible/plugins/action/include_vars.py +++ b/lib/ansible/plugins/action/include_vars.py @@ -236,7 +236,7 @@ class ActionModule(ActionBase): 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):