---
- name: Ensure ~/.config/powershell exists
  become_user: "{{ user.username }}"
  file:
    mode: 0700
    path: ~/.config/powershell
    state: directory

- name: Create the Initialization script for powershell # noqa 503
  become_user: "{{ user.username }}"
  copy:
    dest: "~/.config/powershell/Microsoft.PowerShell_profile.ps1"
    content: "Invoke-Expression (&starship init powershell)"
    mode: 0660
