---
- name: Ensure node log directory exists
  file:
    path: "{{ kayobe_diagnostics_log_dir }}"
    state: "directory"

- name: Ensure node log subdirectories exist
  file:
    path: "{{ kayobe_diagnostics_log_dir }}/{{ item }}"
    state: "directory"
    mode: 0777
  with_items:
    - "podman_logs"
    - "docker_logs"
    - "kayobe_configs"
    - "kolla_configs"
    - "kolla_node_configs"
    - "kolla_build_configs"
    - "system_logs"
    - "kolla"
    - "ansible"
