This commit is contained in:
parent
20ad120829
commit
939e2b4c79
2 changed files with 4 additions and 1 deletions
3
changelogs/fragments/58436-include-correct-error.yml
Normal file
3
changelogs/fragments/58436-include-correct-error.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- includes - Ensure to use the correct filename when AnsibleFileNotFound is
|
||||
encountered (https://github.com/ansible/ansible/issues/58436)
|
|
@ -814,7 +814,7 @@ class StrategyBase:
|
|||
|
||||
except AnsibleError as e:
|
||||
if isinstance(e, AnsibleFileNotFound):
|
||||
reason = "Could not find or access '%s' on the Ansible Controller." % to_text(included_file._filename)
|
||||
reason = "Could not find or access '%s' on the Ansible Controller." % to_text(e.file_name)
|
||||
else:
|
||||
reason = to_text(e)
|
||||
|
||||
|
|
Loading…
Reference in a new issue