Closed berkersal closed 9 months ago
Hello @berkersal
Thank you for reporting this issue. I believe this issue has been already fixed in a previous version of go-installer. I'm not sure how ansible-playbook
is handling the installation. I'm also wondering how you caused that issue. For example, did you try running the script twice without using ansible-playbook
? because the script should not install Go if it's already installed and hence will not keep appending the exports. Also if you're upgrading your Go version, the script is responsible for removing the installed Go version first and clearing the exports and then installing the new version of Go and finally adding the exports again at the end, which means you'll end up with exports only once (no repetition). Please let me know how I can help you further.
Okay, I've found a solution. Wrapping the command as below fixes my problem. I think it is because how ansible handles the shell. Hope it will be helpful to people in the future.
- name: Install GO
shell: bash -ilc "curl -sL https://git.io/go-installer | bash -"
If the installation script from https://git.io/go-installer is run multiple times. Exports are keep appending to .bashrc. This is the result after 2 installations
I am using
ansible-playbook
to install if it makes any difference: