summaryrefslogtreecommitdiffstats
path: root/lib/ansible/modules/find.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:51:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:51:10 +0000
commiteee9982be19a16d860b7e9dde05850e7f8c2276a (patch)
tree21d77352ca156d2d5671ffcdc88a65d4f7fb97b0 /lib/ansible/modules/find.py
parentReleasing progress-linux version 2.16.5-1~progress7.99u1. (diff)
downloadansible-core-eee9982be19a16d860b7e9dde05850e7f8c2276a.tar.xz
ansible-core-eee9982be19a16d860b7e9dde05850e7f8c2276a.zip
Merging upstream version 2.16.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/modules/find.py')
-rw-r--r--lib/ansible/modules/find.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/ansible/modules/find.py b/lib/ansible/modules/find.py
index d2e6c8b..0251224 100644
--- a/lib/ansible/modules/find.py
+++ b/lib/ansible/modules/find.py
@@ -258,6 +258,7 @@ skipped_paths:
version_added: '2.12'
'''
+import errno
import fnmatch
import grp
import os
@@ -434,10 +435,6 @@ def statinfo(st):
}
-def handle_walk_errors(e):
- raise e
-
-
def main():
module = AnsibleModule(
argument_spec=dict(
@@ -482,6 +479,12 @@ def main():
filelist = []
skipped = {}
+ def handle_walk_errors(e):
+ if e.errno in (errno.EPERM, errno.EACCES):
+ skipped[e.filename] = to_text(e)
+ return
+ raise e
+
if params['age'] is None:
age = None
else: