From b25f6dc207324fc00ab490bc6a7eb4c005b8f632 Mon Sep 17 00:00:00 2001 From: Matthew Stobbs Date: Sat, 22 Feb 2025 16:24:44 -0700 Subject: [PATCH] fix go and pipx installs --- tasks/go.yml | 14 +++----------- tasks/pipx.yml | 5 ++++- 2 files changed, 7 insertions(+), 12 deletions(-) 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