summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/files/find.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/modules/files/find.py')
-rw-r--r--lib/ansible/modules/files/find.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ansible/modules/files/find.py b/lib/ansible/modules/files/find.py
index eee57e44fc..15f4d6eced 100644
--- a/lib/ansible/modules/files/find.py
+++ b/lib/ansible/modules/files/find.py
@@ -121,7 +121,7 @@ options:
'''
-EXAMPLES = '''
+EXAMPLES = r'''
# Recursively find /tmp files older than 2 days
- find:
paths: "/tmp"
@@ -149,9 +149,11 @@ EXAMPLES = '''
size: "10m"
# find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz via regex
+# Note that yaml double quotes require escaping backslashes but yaml single
+# quotes do not.
- find:
paths: "/var/tmp"
- patterns: "^.*?\.(?:old|log\.gz)$"
+ patterns: "^.*?\\.(?:old|log\\.gz)$"
size: "10m"
use_regex: True
'''