add profile paths for redhat systems

This commit is contained in:
Matthew Stobbs
2025-09-02 20:42:25 -06:00
parent 26fb8661e2
commit ea248df041
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# vim: set filetype=yaml.ansible :
---
- name: Add goroot to /etc/profile.d
when:
- ansible_os_family == 'RedHat'
ansible.builtin.set_fact:
pkg_src: "{{ pkg_src + ['go_profile_path'] }}"

View File

@@ -0,0 +1,7 @@
# vim: set filetype=yaml.ansible :
---
- name: Add /usr/local/bin to PATH
when:
- ansible_os_family == 'RedHat'
ansible.builtin.set_fact:
pkg_src: "{{ pkg_src + ['usr_local_bin_profile_path'] }}"

View File

@@ -0,0 +1,17 @@
# vim: set filetype=yaml.ansible :
---
- name: Add GOROOT/bin to PATH and define GOROOT
become: true
ansible.builtin.copy:
dest: /etc/profile.d/go.sh
content: |
# enable go
GOROOT=/usr/local/go
pathmunge ${GOROOT}/bin
if [ "$EUID" = "0" ]; then
GOBIN=/usr/local/bin
else
GOBIN=${HOME}/go/bin
pathmunge ${HOME}/go/bin
fi
export GOROOT GOBIN

View File

@@ -0,0 +1,12 @@
# vim: set filetype=yaml.ansible :
---
- name: Add GOROOT/bin to PATH and define GOROOT
become: true
ansible.builtin.copy:
dest: /etc/profile.d/go.sh
owner: root
group: root
mode: '0644'
content: |
# add /usr/local/bin to PATH
pathmunge /usr/local/bin