gantsign / ansible-role-golang Goto Github PK
View Code? Open in Web Editor NEWAnsible role for installing the Go language SDK
Home Page: https://galaxy.ansible.com/gantsign/golang
License: MIT License
Ansible role for installing the Go language SDK
Home Page: https://galaxy.ansible.com/gantsign/golang
License: MIT License
Hi, when running the role with ansible 2.10.4 I get the following warning.
TASK [gantsign.golang : download Go language SDK] **************************************************************************************************************
[DEPRECATION WARNING]: The parameter "sha256sum" has been deprecated and will be removed, use "checksum" instead. This feature will be removed from ansible-
base in version 2.14. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Just raising in case you haven't seen it. Thanks for the role, very useful.
Hi,
I'd like to use this role for several Raspberry Pi 4b hosts running the 32bit Raspberry Pi OS. I'm happy to do the work and raise a PR but I wanted to check something first.
The architecture is arm7l which is what ansible_architecture also reports, however Golang only have an armv6l build. This version of Go works fine on the Pi 4b under Raspbian, however as the current role stands it would mean adding vars/main-armv7l.yml which would contain golang_redis_filename: 'go{{ golang_version }}.linux-armv6l.tar.gz'
. Before I spend time creating all the sha files for armv6l and raise a PR does this sound ok?
Also, I don't suppose you have a python script or similar for scraping all the sha checksums and creating the files?
When I attempt to use this module, I get the following error:
The task includes an option with an undefined variable. The error was:
'ansible_env' is undefined
The error appears to be in '/root/.ansible/roles/gantsign.golang/tasks/main.yml': line 20, column 3,
but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: create download directory
^ here
ansible 2.9.6
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
After installing in a new Debian 11, which go version
returns 1.15 with golang_version: '1.18'
.
Go was correctly installed in the folder, but symlink is not checked.
I wanted to do a PR but not sure how to debug this verify step on IDE though.
I wanted to add a verify test to assert ${golang_version} in cmd.output
and try to reproduce: https://github.com/gantsign/ansible-role-golang/blob/master/molecule/default/tests/test_role.py#L17
Error in title happened after applying, that variable is not documented in readme.
ansible --version
ansible 2.10.10
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
Hi,
If the Ansible playbook has already been run, the GO package won't upgrade to a newer version.
Cheers
Thanks you for this role @freemanjp
Go 1.8.3 is available, please add support for it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.