go-lang-installed

Example:

# Install go version 1.11.4.
- go-lang-installed:
    go_version: 1.11.4

Description

Installs the Go programming language.

Resources

Variables

Name Type Default Description

go_version

n/a --

The version of go.

Examples

Example 1

Install go version 1.11.4.

Code
- go-lang-installed:
    go_version: 1.11.4

Example 2

Install latest version of go.

Code
- go-lang-installed

Code

doc:
  short_help: Make sure Go is available.
  help: |
    Installs the Go programming language.

  references:
    fubarhouse.golang Ansible role: https://github.com/fubarhouse/ansible-role-golang
  examples:
  - title: Install go version 1.11.4.
    vars:
      go_version: 1.11.4
  - title: Install latest version of go.

args:
  go_version:
    required: false
    doc:
      short_help: The version of go.
    cli:
      param_decls:
      - --version

meta:
  tags:
  - featured-frecklecutable
  - go
  - language
  - install

frecklets:
- frecklet:
    name: fubarhouse.golang
    type: ansible-role
    resources:
      ansible-role:
      - fubarhouse.golang
    properties:
      idempotent: true
      internet: true
      elevated: true
    desc:
      references:
        "'fubarhouse.golang' Ansible role": https://github.com/fubarhouse/ansible-role-golang
  task:
    include-type: import
    become: true
  vars:
    go_version: '{{:: go_version ::}}'
frecklecute go-lang-installed --help

Usage: frecklecute go-lang-installed [OPTIONS]

  Installs the Go programming language.

Options:
  --version GO_VERSION  The version of go.
  --help                Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.go_lang_installed.GoLangInstalled
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class GoLangInstalled(AutoPycklet):
    """Installs the Go programming language.

       Args:
         go_version: The version of go.

    """

    FRECKLET_ID = "go-lang-installed"

    go_version: str = None


    def __post_init__(self):
        super(GoLangInstalled, self).__init__(var_names=["go_version"])


frecklet_class = GoLangInstalled
# -*- coding: utf-8 -*-


#
# module path: pycklets.go_lang_installed.GoLangInstalled
#


from pyckles import AutoPycklet

class GoLangInstalled(AutoPycklet):
    """Installs the Go programming language.

       Args:
         go_version: The version of go.

    """

    FRECKLET_ID = "go-lang-installed"

    def __init__(self, go_version=None):

        super(GoLangInstalled, self).__init__(var_names=["go_version"])
        self._go_version = go_version

    @property
    def go_version(self):
        return self._go_version

    @go_version.setter
    def go_version(self, go_version):
        self._go_version = go_version



frecklet_class = GoLangInstalled