Ansible Module find: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:
=Internal=
=Internal=
* [[Ansible Concepts]]
* [[Ansible Concepts]]
=Overview=
Return a list of files based on specific criteria. Multiple criteria are ANDed together.
=Example=
=Example=



Revision as of 04:17, 2 July 2021

External

Internal

Overview

Return a list of files based on specific criteria. Multiple criteria are ANDed together.

Example

- name: Find JetBrains applications
  find:
    paths: "{{ ansible_env.HOME }}/Library/Application Support/JetBrains/Toolbox/apps"
    recurse: yes
    patterns: '.history.json'
    hidden: yes
    file_type: file
    depth: 5
  register: intellij_apps