Bootstrap FreeKB - Ansible - recurse parameter
Ansible - recurse parameter

Updated:   |  Ansible articles

The recurse parameters is used to recursively search at and below a certain directory. For example, let's say you are using the find module to determine if there is a file named "foo.txt" at or below the /tmp directory. Setting the recurse parameter to true will search the /tmp directory, and any subdirectories within the /tmp directory, like this.

- name: determine if there is a file named 'foo.txt' at or below the /tmp directory
  find:
    paths: /tmp
    file_type: file
    hidden: true
    patterns: foo.txt
    recurse: true
  register: out

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter fc444c in the box below so that we can be sure you are a human.