Corrects examples in the `find` module. (#31522)

pull/4420/head
Colin Nolan 2017-10-12 00:43:18 +01:00 committed by Jordan Borean
parent a10a80b8a3
commit 30822e5f91
1 changed files with 4 additions and 4 deletions

View File

@ -100,28 +100,28 @@ EXAMPLES = r'''
recurse: yes recurse: yes
- name: Recursively find /tmp files older than 4 weeks and equal or greater than 1 megabyte - name: Recursively find /tmp files older than 4 weeks and equal or greater than 1 megabyte
- find: find:
paths: /tmp paths: /tmp
age: 4w age: 4w
size: 1m size: 1m
recurse: yes recurse: yes
- name: Recursively find /var/tmp files with last access time greater than 3600 seconds - name: Recursively find /var/tmp files with last access time greater than 3600 seconds
- find: find:
paths: /var/tmp paths: /var/tmp
age: 3600 age: 3600
age_stamp: atime age_stamp: atime
recurse: yes recurse: yes
- name: Find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz - name: Find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz
- find: find:
paths: /var/log paths: /var/log
patterns: '*.old,*.log.gz' patterns: '*.old,*.log.gz'
size: 10m size: 10m
# Note that YAML double quotes require escaping backslashes but yaml single quotes do not. # Note that YAML double quotes require escaping backslashes but yaml single quotes do not.
- name: Find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz via regex - name: Find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz via regex
- find: find:
paths: /var/log paths: /var/log
patterns: "^.*?\\.(?:old|log\\.gz)$" patterns: "^.*?\\.(?:old|log\\.gz)$"
size: 10m size: 10m