packer-installed

Example:

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

Description

Download the Hashicorp Packer 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.

Examples

Example 1

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

Code
- packer-installed

Example 2

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

Code
- packer-installed:
    owner: root

Code

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

args:
  _import: hashicorp-executable-installed
frecklets:
- hashicorp-executable-installed:
    product_name: packer
    version: 1.4.2
    dest: '{{:: dest ::}}'
    platform: '{{:: platform ::}}'
    arch: '{{:: arch ::}}'
    owner: '{{:: owner ::}}'
    group: '{{:: group ::}}'
frecklecute packer-installed --help

Usage: frecklecute packer-installed [OPTIONS]

  Download the Hashicorp Packer 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.
  --help               Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.packer_installed.PackerInstalled
#


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

@dataclass
class PackerInstalled(AutoPycklet):
    """Download the Hashicorp Packer 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.

    """

    FRECKLET_ID = "packer-installed"

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


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


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


#
# module path: pycklets.packer_installed.PackerInstalled
#


from pyckles import AutoPycklet

class PackerInstalled(AutoPycklet):
    """Download the Hashicorp Packer 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.

    """

    FRECKLET_ID = "packer-installed"

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

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

    @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



frecklet_class = PackerInstalled