Member-only story
Create a directory — Ansible module file
How to create an “example” directory on Linux filesystem using Ansible Automation.
How to create a directory with Ansible?
I’m going to show you a live demo and some simple Ansible code.
I’m Luca Berton, and welcome to today’s episode of Ansible Pilot.
Ansible create a directory
- ansible.builtin.file
- Manage files and file properties.
Today we’re talking about the Ansible module file.
The full name is ansible.builtin.file, which means that it is part of the collection of modules “builtin” with ansible and shipped with it.
It’s a module that is pretty stable and out for years.
It works in a different variety of operating systems.
It manages files and file properties.
For Windows targets, use the `ansible.windows.win_file` module instead.
Parameters
- path string (dest, name) — file path
- state string —…