nomad-installed

Example:

# Install default/latest version of Hashicorp Nomad on Linux (amd64), into '$HOME/.local/bin'.
- nomad-installed

Description

Download the Hashicorp Nomad executable and install it locally.

Resources

Variables

Name Type Default Description

arch

string --

The architecture of the host system.

dest

string --

The (absolute) path to the parent folder of the downloaded executable file.

group

string --

The group of the executable.

owner

string --

The owner of the executable.

platform

string --

The platform of the host system.

version

string 0.9.3

The version of Nomad to install.

Examples

Example 1

Install default/latest version of Hashicorp Nomad on Linux (amd64), into '$HOME/.local/bin'.

Code
- nomad-installed

Example 2

Install default/latest version of Hashicorp Nomad system-wide, into '/usr/local/bin'.

Code
- nomad-installed:
    owner: root

Example 3

Install Hashicorp Nomad (version: 0.9.3) on Mac OS X, into '$HOME/.local/bin'.

Code
- nomad-installed:
    platform: darwin
    version: 0.9.3

Code

doc:
  short_help: Install Hashicorp Nomad.
  help: |
    Download the Hashicorp Nomad executable and install it locally.
  references:
    Nomad homepage: https://www.nomadproject.io
  examples:
  - title: Install default/latest version of Hashicorp Nomad on Linux (amd64), into
      '$HOME/.local/bin'.
  - title: Install default/latest version of Hashicorp Nomad system-wide, into '/usr/local/bin'.
    vars:
      owner: root
  - title: "Install Hashicorp Nomad (version: 0.9.3) on Mac OS X, into '$HOME/.local/bin'."
    vars:
      platform: darwin
      version: 0.9.3

args:
  _import: hashicorp-executable-installed
  version:
    doc:
      short_help: The version of Nomad to install.
    type: string
    default: 0.9.3
    required: false
frecklets:
- hashicorp-executable-installed:
    product_name: nomad
    version: '{{:: version ::}}'
    dest: '{{:: dest ::}}'
    platform: '{{:: platform ::}}'
    arch: '{{:: arch ::}}'
    owner: '{{:: owner ::}}'
    group: '{{:: group ::}}'
frecklecute nomad-installed --help

Usage: frecklecute nomad-installed [OPTIONS]

  Download the Hashicorp Nomad executable and install it locally.

Options:
  --arch ARCH          The architecture of the host system.
  --dest DEST          The (absolute) path to the parent folder of the
                       downloaded executable file.
  --group GROUP        The group of the executable.
  --owner USER         The owner of the executable.
  --platform PLATFORM  The platform of the host system.
  --version VERSION    The version of Nomad to install.
  --help               Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.nomad_installed.NomadInstalled
#


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

@dataclass
class NomadInstalled(AutoPycklet):
    """Download the Hashicorp Nomad executable and install it locally.

       Args:
         arch: The architecture of the host system.
         dest: The (absolute) path to the parent folder of the downloaded executable file.
         group: The group of the executable.
         owner: The owner of the executable.
         platform: The platform of the host system.
         version: The version of Nomad to install.

    """

    FRECKLET_ID = "nomad-installed"

    arch: str = None
    dest: str = None
    group: str = None
    owner: str = None
    platform: str = None
    version: str = None


    def __post_init__(self):
        super(NomadInstalled, self).__init__(var_names=["arch", "dest", "group", "owner", "platform", "version"])


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


#
# module path: pycklets.nomad_installed.NomadInstalled
#


from pyckles import AutoPycklet

class NomadInstalled(AutoPycklet):
    """Download the Hashicorp Nomad executable and install it locally.

       Args:
         arch: The architecture of the host system.
         dest: The (absolute) path to the parent folder of the downloaded executable file.
         group: The group of the executable.
         owner: The owner of the executable.
         platform: The platform of the host system.
         version: The version of Nomad to install.

    """

    FRECKLET_ID = "nomad-installed"

    def __init__(self, arch=None, dest=None, group=None, owner=None, platform=None, version="0.9.3"):

        super(NomadInstalled, self).__init__(var_names=["arch", "dest", "group", "owner", "platform", "version"])
        self._arch = arch
        self._dest = dest
        self._group = group
        self._owner = owner
        self._platform = platform
        self._version = version

    @property
    def arch(self):
        return self._arch

    @arch.setter
    def arch(self, arch):
        self._arch = arch

    @property
    def dest(self):
        return self._dest

    @dest.setter
    def dest(self, dest):
        self._dest = dest

    @property
    def group(self):
        return self._group

    @group.setter
    def group(self, group):
        self._group = group

    @property
    def owner(self):
        return self._owner

    @owner.setter
    def owner(self, owner):
        self._owner = owner

    @property
    def platform(self):
        return self._platform

    @platform.setter
    def platform(self, platform):
        self._platform = platform

    @property
    def version(self):
        return self._version

    @version.setter
    def version(self, version):
        self._version = version



frecklet_class = NomadInstalled