Easiest way to make a directory in Ansible.
- name: Create your_directory if it doesn't exist.
file:
path: /etc/your_directory
OR
You want to give sudo privileges to that directory.
- name: Create your_directory if it doesn't exist.
file:
path: /etc/your_directory
mode: '777'