asdf-pkg-mgr-plugin
Example:
# Install the asdf Python plugin and Python version 3.6.8 for the current user. - asdf-pkg-mgr-plugin: plugin: python version: 3.6.8
Description
Install a plugin for asdf.
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The asdf plugin to use. Required |
|
string | -- | The user to install the plugin for. |
|
string | -- | The version of the language runtime to install. |
Examples
Example 1
Install the asdf Python plugin and Python version 3.6.8 for the current user.
Code
- asdf-pkg-mgr-plugin: plugin: python version: 3.6.8
Code
doc: short_help: Install a plugin for asdf. examples: - title: Install the asdf Python plugin and Python version 3.6.8 for the current user. vars: plugin: python version: 3.6.8 args: plugin: doc: short_help: The asdf plugin to use. type: string required: true cli: param_decls: - -p - --plugin version: doc: short_help: The version of the language runtime to install. required: false type: string user: doc: short_help: The user to install the plugin for. type: string required: false frecklets: - user-exists: frecklet::skip: '{{:: user | true_if_empty ::}}' name: '{{:: user ::}}' - frecklet: type: ansible-module name: asdf properties: idempotent: true elevated: '{{:: user | false_if_empty ::}}' internet: true desc: short: 'install asdf plugin: {{:: plugin ::}}{%:: if version ::%}, version {{:: version ::}}{%:: endif ::%}' references: "'asdf' Ansible module (unofficial)": https://gitlab.com/nsbl/nsbl-plugins/blob/master/library/asdf.py task: become: '{{:: user | false_if_empty ::}}' become_user: '{{:: user ::}}' vars: plugin: '{{:: plugin ::}}' version: '{{:: version ::}}' state: present
frecklecute asdf-pkg-mgr-plugin --help Usage: frecklecute asdf-pkg-mgr-plugin [OPTIONS] Install a plugin for asdf. Options: -p, --plugin PLUGIN The asdf plugin to use. [required] --user USER The user to install the plugin for. --version VERSION The version of the language runtime to install. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.asdf_pkg_mgr_plugin.AsdfPkgMgrPlugin # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class AsdfPkgMgrPlugin(AutoPycklet): """Install a plugin for asdf. Args: plugin: The asdf plugin to use. user: The user to install the plugin for. version: The version of the language runtime to install. """ FRECKLET_ID = "asdf-pkg-mgr-plugin" plugin: str = None user: str = None version: str = None def __post_init__(self): super(AsdfPkgMgrPlugin, self).__init__(var_names=["plugin", "user", "version"]) frecklet_class = AsdfPkgMgrPlugin
# -*- coding: utf-8 -*- # # module path: pycklets.asdf_pkg_mgr_plugin.AsdfPkgMgrPlugin # from pyckles import AutoPycklet class AsdfPkgMgrPlugin(AutoPycklet): """Install a plugin for asdf. Args: plugin: The asdf plugin to use. user: The user to install the plugin for. version: The version of the language runtime to install. """ FRECKLET_ID = "asdf-pkg-mgr-plugin" def __init__(self, plugin=None, user=None, version=None): super(AsdfPkgMgrPlugin, self).__init__(var_names=["plugin", "user", "version"]) self._plugin = plugin self._user = user self._version = version @property def plugin(self): return self._plugin @plugin.setter def plugin(self, plugin): self._plugin = plugin @property def user(self): return self._user @user.setter def user(self, user): self._user = user @property def version(self): return self._version @version.setter def version(self, version): self._version = version frecklet_class = AsdfPkgMgrPlugin