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 7db5004ca34..ca8b483b165 100644 --- a/lib/ansible/modules/find.py +++ b/lib/ansible/modules/find.py @@ -493,7 +493,7 @@ def main(): if not params['recurse']: break except Exception as e: - warn = "Skipped '%s' path due to this access issue: %s\n" % (npath, to_text(e)) + warn = "Skipped '%s' path due to this access issue: %s\n" % (to_text(npath), to_text(e)) module.warn(warn) msg += warn