|
|
2 years ago | |
|---|---|---|
| .. | ||
| .devcontainer | 2 years ago | |
| .github | 2 years ago | |
| defaults | 2 years ago | |
| handlers | 2 years ago | |
| meta | 2 years ago | |
| molecule | 2 years ago | |
| requirements | 2 years ago | |
| tasks | 2 years ago | |
| templates | 2 years ago | |
| vars | 2 years ago | |
| .ansible-lint | 2 years ago | |
| .editorconfig | 2 years ago | |
| .gitattributes | 2 years ago | |
| .gitignore | 2 years ago | |
| .python-version | 2 years ago | |
| .yamllint | 2 years ago | |
| LICENSE | 2 years ago | |
| README.md | 2 years ago | |
| tox.ini | 2 years ago | |
README.md
Ansible Role: Go language SDK
Role to download and install the Go language SDK.
Requirements
-
Ansible Core >= 2.12
-
Linux Distribution
-
Debian Family
-
Debian
- Buster (10)
- Bullseye (11)
-
Ubuntu
- Xenial (16.04)
- Bionic (18.04)
- Focal (20.04)
-
-
RedHat Family
-
Rocky Linux
- 8
-
Fedora
- 35
-
-
SUSE Family
-
openSUSE
- 15.3
-
-
Note: other versions are likely to work but have not been tested.
-
Role Variables
The following variables will change the behavior of this role (default values are shown below):
# Go language SDK version number
golang_version: '1.21.1'
# Mirror to download the Go language SDK redistributable package from
golang_mirror: 'https://storage.googleapis.com/golang'
# Base installation directory the Go language SDK distribution
golang_install_dir: '/opt/go/{{ golang_version }}'
# Directory to store files downloaded for Go language SDK installation
golang_download_dir: "{{ x_ansible_download_dir | default(ansible_facts.env.HOME + '/.ansible/tmp/downloads') }}"
# Location for GOPATH environment variable
golang_gopath:
Supported Go language SDK Versions
The following versions of Go language SDK are supported without any additional configuration (for other versions follow the Advanced Configuration instructions):
1.21.11.21.01.20.81.20.71.20.61.20.51.20.41.20.31.20.21.20.11.201.19.121.19.111.19.101.19.91.19.81.19.71.19.61.19.51.19.41.19.31.19.21.19.11.191.18.101.18.91.18.81.18.71.18.61.18.51.18.41.18.31.18.21.18.11.181.17.131.17.121.17.111.17.101.17.91.17.81.17.71.17.61.17.51.17.41.17.31.17.21.17.11.171.16.151.16.141.16.131.16.121.16.111.16.101.16.91.16.81.16.71.16.61.16.51.16.41.16.31.16.21.16.11.161.15.151.15.141.15.131.15.121.15.111.15.101.15.91.15.81.15.71.15.61.15.51.15.41.15.31.15.21.15.11.151.14.151.14.141.14.131.14.121.14.111.14.101.14.91.14.81.14.71.14.61.14.51.14.41.14.31.14.21.14.11.141.13.151.13.141.13.131.13.121.13.111.13.101.13.91.13.81.13.71.13.61.13.51.13.41.13.31.13.21.13.11.131.12.171.12.161.12.151.12.141.12.131.12.121.12.111.12.101.12.91.12.81.12.71.12.61.12.51.12.41.12.31.12.21.12.11.121.11.131.11.121.11.111.11.101.11.91.11.81.11.71.11.61.11.51.11.41.11.31.11.21.11.11.111.10.81.10.71.10.61.10.51.10.41.10.31.10.21.10.11.101.9.61.9.51.9.41.9.31.9.21.9.11.91.8.71.8.61.8.51.8.41.8.31.8.21.8.11.81.7.41.7.3
Advanced Configuration
The following role variable is dependent on the Go language SDK version; to use a Go language SDK version not pre-configured by this role you must configure the variable below:
# SHA256 sum for the redistributable package (i.e. "go{{ golang_version }}.linux-amd64.tar.gz")
golang_redis_sha256sum: '6e3e9c949ab4695a204f74038717aa7b2689b1be94875899ac1b3fe42800ff82'
Example Playbook
- hosts: servers
roles:
- role: gantsign.golang
golang_gopath: '$HOME/workspace-go'
Role Facts
This role exports the following Ansible facts for use by other roles:
-
ansible_local.golang.general.version- e.g.
1.7.3
- e.g.
-
ansible_local.golang.general.home- e.g.
/opt/golang/1.7.3
- e.g.
More Roles From GantSign
You can find more roles from GantSign on Ansible Galaxy.
Development & Testing
This project uses the following tooling:
- Molecule for orchestrating test scenarios
- Testinfra for testing the changes on the remote
- pytest the testing framework
- Tox manages Python virtual environments for linting and testing
- pip-tools for managing dependencies
A Visual Studio Code Dev Container is provided for developing and testing this role.
License
MIT
Author Information
John Freeman
GantSign Ltd. Company No. 06109112 (registered in England)