|
|
@ -11,7 +11,7 @@ version_added: "2.4"
|
|
|
|
short_description: recursively match all files in a directory tree
|
|
|
|
short_description: recursively match all files in a directory tree
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- This lookup enables you to template a complete tree of files on a target system while retaining permissions and ownership.
|
|
|
|
- This lookup enables you to template a complete tree of files on a target system while retaining permissions and ownership.
|
|
|
|
- Supports directories, files and symlinks, including SELinux and other file properties
|
|
|
|
- Supports directories, files and symlinks, including SELinux and other file properties.
|
|
|
|
- If you provide more than one path, it will implement a first_found logic, and will not process entries it already processed in previous paths.
|
|
|
|
- If you provide more than one path, it will implement a first_found logic, and will not process entries it already processed in previous paths.
|
|
|
|
This enables merging different trees in order of importance, or add role_vars to specific paths to influence different instances of the same role.
|
|
|
|
This enables merging different trees in order of importance, or add role_vars to specific paths to influence different instances of the same role.
|
|
|
|
options:
|
|
|
|
options:
|
|
|
@ -29,7 +29,7 @@ EXAMPLES = """
|
|
|
|
with_filetree: web/
|
|
|
|
with_filetree: web/
|
|
|
|
when: item.state == 'directory'
|
|
|
|
when: item.state == 'directory'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Template files
|
|
|
|
- name: Template files (explicitly skip directories in order to use the 'src' attribute)
|
|
|
|
template:
|
|
|
|
template:
|
|
|
|
src: '{{ item.src }}'
|
|
|
|
src: '{{ item.src }}'
|
|
|
|
dest: /web/{{ item.path }}
|
|
|
|
dest: /web/{{ item.path }}
|
|
|
@ -53,7 +53,9 @@ RETURN = """
|
|
|
|
description: list of dictionaries with file information
|
|
|
|
description: list of dictionaries with file information
|
|
|
|
contains:
|
|
|
|
contains:
|
|
|
|
src:
|
|
|
|
src:
|
|
|
|
description: TODO
|
|
|
|
description:
|
|
|
|
|
|
|
|
- full path to file
|
|
|
|
|
|
|
|
- not returned when C(item.state) is set to C(directory)
|
|
|
|
root:
|
|
|
|
root:
|
|
|
|
description: allows filtering by original location
|
|
|
|
description: allows filtering by original location
|
|
|
|
path:
|
|
|
|
path:
|
|
|
|