Ansible Module file

From NovaOrdis Knowledge Base
Revision as of 06:56, 12 December 2019 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

External

Internal

Overview

Manage file, directory and symlinks properties: create, set attributes, remove.

Examples

Create a Directory

- name: create local storage mount point
  file:
    path: "{{ item }}"
    state: directory
    owner: root
  with_items:
    - "/mnt/ebs0"
  when:
    - inventory_hostname in groups['kube-node']