Ansible Module fileglob: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * https://docs.ansible.com/ansible/latest/collections/ansible/builtin/fileglob_lookup.html#ansible-collections-ansible-builtin-fileglob-lookup =Internal= * Ansibl...")
 
Line 4: Line 4:
* [[Ansible Concepts#fileglob|Ansible Concepts]]
* [[Ansible Concepts#fileglob|Ansible Concepts]]
=Overview=
=Overview=
A module that lists files matching a pattern. Patterns are only supported on files, not directory/paths. Matching is against local system files on the Ansible controller. Returns a string list of paths joined by commas, or an empty list if no files match. For a "true list" pass <code>wantlist=True</code> to the lookup.
To iterate a list of files on a remote node, use the [[Ansible Module find|find]] module.

Revision as of 08:57, 4 July 2021

External

Internal

Overview

A module that lists files matching a pattern. Patterns are only supported on files, not directory/paths. Matching is against local system files on the Ansible controller. Returns a string list of paths joined by commas, or an empty list if no files match. For a "true list" pass wantlist=True to the lookup.

To iterate a list of files on a remote node, use the find module.