ansible-role-k3s/tasks/ensure_directories.yml

13 lines
306 B
YAML
Raw Normal View History

---
- name: Ensure {{ directory.name }} exists
ansible.builtin.file:
path: "{{ directory.path }}"
state: directory
2021-05-15 21:41:33 +02:00
mode: "{{ directory.mode | default(755) }}"
become: "{{ k3s_become }}"
when:
- directory.path is defined
- directory.path | length > 0
- directory.path != omit