- name: Bash Configuration for {{ bash_user_name }}
  block:
    - name: Deploy .bash_aliases for {{ bash_user_name }}
      ansible.builtin.copy:
        src: files/.bash_aliases
        dest: "{{ bash_user_home }}/.bash_aliases"
        owner: "{{ bash_user_name }}"
        group: "{{ bash_user_name }}"
        mode: "0644"

    - name: Add XDG environment variables to .profile for {{ bash_user_name }}
      ansible.builtin.blockinfile:
        path: "{{ bash_user_home }}/.profile"
        block: |
          export XDG_CONFIG_HOME="$HOME/.config"
          export XDG_DATA_HOME="$HOME/.local/share"
          export XDG_CACHE_HOME="$HOME/.cache"
          export EDITOR="nvim"
        create: true
        owner: "{{ bash_user_name }}"
        group: "{{ bash_user_name }}"
        mode: "0644"
