Image

Ansible - Create directory

Learn to think well,
It's learning to live well.

Introduction

This article aims to assist you in completing your tasks efficiently by providing useful information that can serve as a reference manual. Regardless of your work environment, having this manual at your side will enable you to complete tasks more swiftly, eliminating the need to constantly search the internet for answers.

Create directory

---
- name: file module demo
  hosts: all
  vars:
    production: "~/production"
  tasks:
    - name: Creating a directory
      ansible.builtin.file:
        path: ""
        state: directory
        owner: ansible
        group: ansible
        mode: '0644'
Icon