- name: Set go config directory for macOS set_fact: goenv_conf_dir: '{{ goenv_homedir }}/Library/Application Support/go' when: ansible_os_family == "Darwin" tags: - dotfiles - name: Set go config directory for Linux set_fact: goenv_conf_dir: '{{ goenv_homedir }}/.config/go' when: ansible_os_family != "Darwin" tags: - dotfiles - name: Create go config directory ansible.builtin.file: path: '{{ goenv_conf_dir }}' state: directory owner: '{{ goenv_user }}' group: '{{ goenv_group }}' mode: u+rw,g-wx,o-rwx tags: - dotfiles - name: Configure go enviroment ansible.builtin.template: src: misc/dotfiles/goenv.j2 dest: '{{ goenv_conf_dir }}/env' owner: '{{ goenv_user }}' group: '{{ goenv_group }}' mode: u+rw,g+r,o+r tags: - dotfiles