diff --git a/changelogs/fragments/find_error_fix.yml b/changelogs/fragments/find_error_fix.yml new file mode 100644 index 00000000000..c4dcbd5a2f0 --- /dev/null +++ b/changelogs/fragments/find_error_fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - find action, correctly convert path to text when warning about skiping. diff --git a/lib/ansible/modules/find.py b/lib/ansible/modules/find.py index 6841274e119..1b81da71e8f 100644 --- a/lib/ansible/modules/find.py +++ b/lib/ansible/modules/find.py @@ -512,8 +512,8 @@ def main(): if not params['recurse']: break except Exception as e: - module.warn("Skipped '%s' path due to this access issue: %s\n" % (npath, to_text(e))) skipped[npath] = to_text(e) + module.warn("Skipped '%s' path due to this access issue: %s\n" % (to_text(npath), skipped[npath])) has_warnings = True if has_warnings: