---
- name: Ensure Composer directory exists
  become_user: "{{ user.username }}"
  ansible.windows.win_file:
    path: "{{ composer_home_path }}"
    state: directory

- name: Ensure GitHub OAuth token for Composer is added
  become_user: "{{ user.username }}"
  ansible.windows.win_template:
    src: "auth.json.j2"
    dest: "{{ composer_home_path }}\\auth.json"
  when: composer_github_oauth_token | length > 0
