Giter Site home page Giter Site logo

andrewnimmo / ansible-role-golang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gantsign/ansible-role-golang

0.0 2.0 0.0 125 KB

Ansible role for installing the Go language SDK

Home Page: https://galaxy.ansible.com/gantsign/golang

License: MIT License

Python 7.08% Shell 92.92%

ansible-role-golang's Introduction

Ansible Role: Go language SDK

Build Status Ansible Galaxy License

Role to download and install the Go language SDK.

Requirements

  • Ansible >= 2.5

  • Linux Distribution

    • Debian Family

      • Debian

        • Jessie (8)
        • Stretch (9)
      • Ubuntu

        • Trusty (14.04)
        • Xenial (16.04)
        • Bionic (18.04)
    • RedHat Family

      • CentOS

        • 6
        • 7
      • Fedora

        • 28
    • SUSE Family

      • openSUSE

        • 15.0
    • 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.12.4'

# 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_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.12.4
  • 1.12.3
  • 1.12.2
  • 1.12.1
  • 1.12
  • 1.11.9
  • 1.11.8
  • 1.11.7
  • 1.11.6
  • 1.11.5
  • 1.11.4
  • 1.11.3
  • 1.11.2
  • 1.11.1
  • 1.11
  • 1.10.8
  • 1.10.7
  • 1.10.6
  • 1.10.5
  • 1.10.4
  • 1.10.3
  • 1.10.2
  • 1.10.1
  • 1.10
  • 1.9.6
  • 1.9.5
  • 1.9.4
  • 1.9.3
  • 1.9.2
  • 1.9.1
  • 1.9
  • 1.8.7
  • 1.8.6
  • 1.8.5
  • 1.8.4
  • 1.8.3
  • 1.8.2
  • 1.8.1
  • 1.8
  • 1.7.4
  • 1.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
  • ansible_local.golang.general.home

    • e.g. /opt/golang/1.7.3

More Roles From GantSign

You can find more roles from GantSign on Ansible Galaxy.

Development & Testing

This project uses Molecule to aid in the development and testing; the role is unit tested using Testinfra and pytest.

To develop or test you'll need to have installed the following:

Because the above can be tricky to install, this project includes Molecule Wrapper. Molecule Wrapper is a shell script that installs Molecule and it's dependencies (apart from Linux) and then executes Molecule with the command you pass it.

To test this role using Molecule Wrapper run the following command from the project root:

./moleculew test

Note: some of the dependencies need sudo permission to install.

License

MIT

Author Information

John Freeman

GantSign Ltd. Company No. 06109112 (registered in England)

ansible-role-golang's People

Contributors

andrewhowdencom avatar freemanjp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.