buluma.go
Ansible Role go
Installation of Go programming language for Linux.
GitHub | Version | Issues | Pull Requests | Downloads |
---|---|---|---|---|
Example Playbook
This example comes from molecule/default/converge.yml
and is tested whenever there's a push, pull request, or release.
---
- name: Converge
hosts: all
become: true
gather_facts: true
pre_tasks:
- name: Update apt cache.
ansible.builtin.apt: update_cache=true cache_valid_time=600
when: ansible_os_family == 'Debian'
changed_when: false
roles:
- role: buluma.go
tasks:
- name: Verify that Go is installed and available in the $PATH.
ansible.builtin.command: go version
environment:
PATH: /usr/local/go/bin:{{ ansible_env.PATH }}
changed_when: false
The machine needs to be set up first. In CI, this is done using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: buluma.bootstrap
- role: buluma.core_dependencies
- role: buluma.buildtools
- role: buluma.ca_certificates
For a detailed explanation and example, check this guide on using these roles.
Role Variables
Default values for the variables are outlined in defaults/main.yml
:
---
go_version: "1.21.6"
go_platform: linux
go_arch: amd64
go_tarball: go{{ go_version }}.{{ go_platform }}-{{ go_arch }}.tar.gz
go_download_url: "https://dl.google.com/go/{{ go_tarball }}"
go_checksum: '3f934f40ac360b9c01f616a9aa1796d227d8b0328bf64cb045c7b8c4ee9caea4'
Requirements
- Install pip packages listed in requirements.txt.
Used Roles Status
The following roles are required to set up the system. You can choose other ways to prepare your system.
Requirement | GitHub | Version |
---|---|---|
buluma.bootstrap | ||
buluma.core_dependencies | ||
buluma.buildtools | ||
buluma.ca_certificates |
Context
This role is part of a set of compatible roles. For more information, refer to the roles documentation.
Here's a visual of related roles:
Compatibility
This role has been tested on the following container images:
Container | Tags |
---|---|
Fedora | all |
Amazon | 2023, Candidate |
Debian | all |
Ubuntu | all |
The minimum required version of Ansible is 2.12. Tests have been conducted for:
- The previous version.
- The current version.
- The development version.
If you encounter issues, please report them on GitHub.
Changelog
License
Author
ansible-galaxy install buluma.go