mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Corrects examples in the find
module. (#31522)
This commit is contained in:
parent
a10a80b8a3
commit
30822e5f91
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue