Add a recurse example to file module docs (#54926)

Add recurse example to file module
must set state: directory to use recurse: yes
pull/55230/head
Alicia Cozine 6 years ago committed by GitHub
parent c5991b970f
commit 32218332ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save