summaryrefslogtreecommitdiffstats
path: root/lib/ansible/plugins/filter/fileglob.yml
blob: 69e8a9b2aabf12dff2525c014a1b7ad08b94994f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DOCUMENTATION:
  name: fileglob
  short_description: explode a path glob to matching files
  description:
    - Return a list of files that matches the supplied path glob pattern.
    - Filters run on the controller, so the files are matched from the controller's file system.
  positional: _input
  options:
    _input:
      description: Path glob pattern.
      type: string
      required: true

EXAMPLES: |
  # found = ['/etc/hosts', '/etc/hasts']
  found: "{{ '/etc/h?sts' | fileglob }}"

RETURN:
  _value:
    description: List of files matched.
    type: list
    elements: string