You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The role is installing fine go binary after extracting to specified location.
Issue is that after I ssh into remote machine, and sudo su, go command is not available as root.
I can solve that by running manually in terminal
source /etc/profile.d/golang.sh
# go now will work
ansible --version ansible 2.10.10
Why is this happening and not working for root ?
When I ssh at machine ssh -i key ubuntu@someip" as ubuntu user (in ec2) i can run go commad, profile.d is loaded, but after sudo su` that does not work as root.
Then all other ansible scripts fail that use root user to use installed go for building code
The text was updated successfully, but these errors were encountered:
Without knowing what operating system you are using and which shell and the contents of various files, it is hard to tell, what is different on your server for the root user.
The solution is to use sudo su - instead of sudo su or add source /etc/profile.d/golang.sh to ~/.bashrc of the user you're switching to as /etc/profile.d/* loads only for login shells.
The role is installing fine go binary after extracting to specified location.
Issue is that after I ssh into remote machine, and
sudo su
, go command is not available as root.I can solve that by running manually in terminal
ansible --version ansible 2.10.10
Why is this happening and not working for root ?
When I ssh at machine
ssh -i key ubuntu@someip" as ubuntu user (in ec2) i can run go commad, profile.d is loaded, but after
sudo su` that does not work as root.Then all other ansible scripts fail that use root user to use installed go for building code
The text was updated successfully, but these errors were encountered: