Ansible Module stat: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


=Overview=
=Overview=
Retrieve file or file system status.
Retrieves facts for a file similar to the Linux/Unix "stat" command.


<syntaxhighlight lang='yaml'>
<syntaxhighlight lang='yaml'>

Revision as of 06:04, 5 July 2021

External

Internal

Overview

Retrieves facts for a file similar to the Linux/Unix "stat" command.

- name: "Check if a directory exists"
  stat:
    path: "{{ some_path }}"
  register: some_dir