mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add a recurse example to file module docs (#54926)
Add recurse example to file module must set state: directory to use recurse: yes
This commit is contained in:
parent
c5991b970f
commit
32218332ee
1 changed files with 10 additions and 1 deletions
|
@ -59,7 +59,7 @@ options:
|
|||
recurse:
|
||||
description:
|
||||
- Recursively set the specified file attributes on directory contents.
|
||||
- This applies only to C(state=directory).
|
||||
- This applies only when C(state) is set to C(directory).
|
||||
type: bool
|
||||
default: no
|
||||
version_added: '1.1'
|
||||
|
@ -187,6 +187,15 @@ EXAMPLES = r'''
|
|||
path: /etc/another_file
|
||||
state: file
|
||||
access_time: '{{ "%Y%m%d%H%M.%S" | strftime(stat_var.stat.atime) }}'
|
||||
|
||||
- name: Recursively change ownership of a directory
|
||||
file:
|
||||
path: /etc/foo
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: foo
|
||||
group: foo
|
||||
|
||||
'''
|
||||
RETURN = r'''
|
||||
|
||||
|
|
Loading…
Reference in a new issue