diff --git a/tasks/go.yml b/tasks/go.yml index ec173c2..3c525ef 100644 --- a/tasks/go.yml +++ b/tasks/go.yml @@ -1,16 +1,8 @@ --- -- debug: - var: path.go -- debug: - var: path.bin - -- name: Install go packages +- name: Install go package {{ pkg }} become: "{{ ext_become }}" environment: - GOBIN: "{% if ansible_distribution == 'MacOSX' %}/usr/local/bin{% else %}{{ path.bin }}{% endif %}" + GOBIN: "{{ path.bin }}" PATH: "{{ path.go }}/bin:$PATH" ansible.builtin.command: - cmd: - - go - - install - - "{{ pkg }}" + cmd: go install {{ pkg }} diff --git a/tasks/pipx.yml b/tasks/pipx.yml index 8e67a18..38cc9e3 100644 --- a/tasks/pipx.yml +++ b/tasks/pipx.yml @@ -2,7 +2,10 @@ --- - name: Install pipx pkg become: "{{ ext_become }}" + environment: + PIPX_HOME: "{{ path.pipx }}" + PIPX_BIN_DIR: "{{ path.bin }}" community.general.pipx: executable: "{{ pipx_exec }}" - name: "{{ pipx_pkg }}" + name: "{{ pkg }}" state: latest