Ansible Module stat: 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/stat_module.html =Internal= * Ansible Concepts =Overview=")
 
Line 6: Line 6:


=Overview=
=Overview=
Retrieve file or file system status.
<syntaxhighlight lang='yaml'>
- name: "Check if a directory exists"
  stat:
    path: "{{ some_path }}"
  register: some_dir
</syntaxhighlight>

Revision as of 05:27, 2 July 2021

External

Internal

Overview

Retrieve file or file system status.

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