consul-installed
Example:
# Install default/latest version of Hashicorp Consul system-wide, into '/usr/local/bin'. - consul-installed: owner: root
Description
Installs the Hashicorp Consul 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 |
---|---|---|---|
|
string | -- | The architecture of the host system. |
|
string | -- | The (absolute) path to the parent folder of the downloaded executable file. |
|
string | -- | The group of the executable. |
|
string | -- | The owner of the executable. |
|
string | -- | The platform of the host system. |
|
string | 1.5.3 | The version of consul to install. |
Examples
Example 1
Install default/latest version of Hashicorp Consul system-wide, into '/usr/local/bin'.
Code
- consul-installed: owner: root
Example 2
Install default/latest version of Hashicorp Consul on Linux (amd64), into '$HOME/.local/bin'.
Code
- consul-installed
Example 3
Install Hashicorp Consul (version: 1.5.2) on Mac OS X, into '$HOME/.local/bin'.
Code
- consul-installed: platform: darwin version: 1.5.2
Code
doc: short_help: Install Hashicorp Consul. help: | Installs the Hashicorp [Consul](https://www.consul.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.consul.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.5.2 args: _import: hashicorp-executable-installed version: doc: short_help: The version of consul to install. type: string default: 1.5.3 required: false frecklets: - hashicorp-executable-installed: product_name: consul version: '{{:: version ::}}' dest: '{{:: dest ::}}' platform: '{{:: platform ::}}' arch: '{{:: arch ::}}' owner: '{{:: owner ::}}' group: '{{:: group ::}}'
frecklecute consul-installed --help Usage: frecklecute consul-installed [OPTIONS] Installs the Hashicorp [Consul](https://www.consul.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 consul to install. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.consul_installed.ConsulInstalled # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class ConsulInstalled(AutoPycklet): """Installs the Hashicorp [Consul](https://www.consul.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 consul to install. """ FRECKLET_ID = "consul-installed" arch: str = None dest: str = None group: str = None owner: str = None platform: str = None version: str = None def __post_init__(self): super(ConsulInstalled, self).__init__(var_names=["arch", "dest", "group", "owner", "platform", "version"]) frecklet_class = ConsulInstalled
# -*- coding: utf-8 -*- # # module path: pycklets.consul_installed.ConsulInstalled # from pyckles import AutoPycklet class ConsulInstalled(AutoPycklet): """Installs the Hashicorp [Consul](https://www.consul.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 consul to install. """ FRECKLET_ID = "consul-installed" def __init__(self, arch=None, dest=None, group=None, owner=None, platform=None, version="1.5.3"): super(ConsulInstalled, 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 = ConsulInstalled