You can create a directory with Ansible using the
file module, setting
- name: Creates directory file: path: /home/user/my/quite/nested/directory state: directory
This will create the directory and all necessary intermediate ones that didn’t previously exist.
As always with
file you can additionally specify the
that own the directory, as well as the octal
mode. Intermediate directories
will be created with the same attributes.
Check the full documentation
for other examples of use of the