---
# Create all directories required by Docker containers

- name: Create required directories
  ansible.builtin.file:
    path: "{{ cml_deploy_path }}/{{ item }}"
    state: directory
    mode: "0775"
  loop: "{{ cml_required_dirs }}"

- name: Ensure .gitkeep files exist
  ansible.builtin.copy:
    content: ""
    dest: "{{ cml_deploy_path }}/{{ item }}/.gitkeep"
    force: false
    mode: "0644"
  loop:
    - configs/code-server/.config
    - configs/code-server/.local
    - configs/homepage/logs
