Adds example using max_matches.

pull/83153/head
Colin Nolan 1 month ago
parent 5befe33f03
commit 6928b1b20e

@ -236,6 +236,16 @@ EXAMPLES = r'''
- '^_[0-9]{2,4}_.*.log$'
- '^[a-z]{1,5}_.*log$'
- name: Find file containing "wally" without necessarily reading all files
ansible.builtin.find:
paths: /var/log
file_type: file
contains: wally
read_whole_file: true
patterns: "^.*\\.log$"
use_regex: true
recurse: true
max_matches: 1
'''
RETURN = r'''

Loading…
Cancel
Save