---
# Generate .env from Jinja2 template (replaces config.sh)

- name: Generate .env file
  ansible.builtin.template:
    src: env.j2
    dest: "{{ cml_deploy_path }}/.env"
    mode: "0600"
    backup: true
  register: env_result

- name: Report .env status
  ansible.builtin.debug:
    msg: ".env {{ 'updated' if env_result.changed else 'unchanged' }}"
