vault-installed

Example:

# Install default/latest version of Hashicorp Consul system-wide, into '/usr/local/bin'.
- vault-installed:
    owner: root

Description

Installs the Hashicorp Vault binary for the architecture/platform of your choice.

If no owner is specified, the binary will be installed for the user who runs the frecklet, into '$HOME/.local/bin'. If you select 'root' as owner, the binary will be installed into '/usr/local/bin'. If you specify a 'owner' and 'group' and they don't exist yet, they will be created.

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 1.2.1

The version of Vault to install.

Examples

Example 1

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

Code
- vault-installed:
    owner: root

Example 2

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

Code
- vault-installed

Example 3

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

Code
- vault-installed:
    platform: darwin
    version: 1.1.3

Code

doc:
  short_help: Install Hashicorp Vault.
  help: |
    Installs the Hashicorp [Vault](https://www.vaultproject.io/) binary for the architecture/platform of your choice.

    If no owner is specified, the binary will be installed for the user who runs the frecklet, into '$HOME/.local/bin'.
    If you select 'root' as owner, the binary will be installed into '/usr/local/bin'. If you specify a 'owner' and 'group' and they don't exist yet, they will be created.
  references:
    Consul homepage: https://www.vaultproject.io/
  examples:
  - title: Install default/latest version of Hashicorp Consul system-wide, into '/usr/local/bin'.
    vars:
      owner: root
  - title: Install default/latest version of Hashicorp Consul on Linux (amd64), into
      '$HOME/.local/bin'.
  - title: "Install Hashicorp Consul (version: 1.5.2) on Mac OS X, into '$HOME/.local/bin'."
    vars:
      platform: darwin
      version: 1.1.3
args:
  _import: hashicorp-executable-installed
  version:
    doc:
      short_help: The version of Vault to install.
    type: string
    default: 1.2.1
    required: false
frecklets:
- hashicorp-executable-installed:
    product_name: vault
    version: '{{:: version ::}}'
    dest: '{{:: dest ::}}'
    platform: '{{:: platform ::}}'
    arch: '{{:: arch ::}}'
    owner: '{{:: owner ::}}'
    group: '{{:: group ::}}'
frecklecute vault-installed --help

Usage: frecklecute vault-installed [OPTIONS]

  Installs the Hashicorp [Vault](https://www.vaultproject.io/) binary for
  the architecture/platform of your choice.

  If no owner is specified, the binary will be installed for the user who
  runs the frecklet, into '$HOME/.local/bin'. If you select 'root' as owner,
  the binary will be installed into '/usr/local/bin'. If you specify a
  'owner' and 'group' and they don't exist yet, they will be created.

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 Vault to install.
  --help               Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.vault_installed.VaultInstalled
#


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

@dataclass
class VaultInstalled(AutoPycklet):
    """Installs the Hashicorp [Vault](https://www.vaultproject.io/) binary for the architecture/platform of your choice.

     If no owner is specified, the binary will be installed for the user who runs the frecklet, into '$HOME/.local/bin'.
     If you select 'root' as owner, the binary will be installed into '/usr/local/bin'. If you specify a 'owner' and 'group' and they don't exist yet, they will be created.

       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 Vault to install.

    """

    FRECKLET_ID = "vault-installed"

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


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


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


#
# module path: pycklets.vault_installed.VaultInstalled
#


from pyckles import AutoPycklet

class VaultInstalled(AutoPycklet):
    """Installs the Hashicorp [Vault](https://www.vaultproject.io/) binary for the architecture/platform of your choice.

     If no owner is specified, the binary will be installed for the user who runs the frecklet, into '$HOME/.local/bin'.
     If you select 'root' as owner, the binary will be installed into '/usr/local/bin'. If you specify a 'owner' and 'group' and they don't exist yet, they will be created.

       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 Vault to install.

    """

    FRECKLET_ID = "vault-installed"

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

        super(VaultInstalled, 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 = VaultInstalled