register-public-ssh-key-content
Description
Registers the content of a public ssh key to a variable.
Either the 'path' or the 'key_content' argument must be provided
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The name of the key to register the public key content under. Required |
|
string | -- | The content of the ssh key. |
|
string | -- | The (absolute) path to the public ssh key. |
|
string | -- | The name of the user who owns the ssh key. |
Code
doc: short_help: Registers the content of a public ssh key. help: | Registers the content of a public ssh key to a variable. Either the 'path' or the 'key_content' argument must be provided args: path: doc: short_help: The (absolute) path to the public ssh key. type: string required: false key_content: doc: short_help: The content of the ssh key. required: false type: string user: doc: short_help: The name of the user who owns the ssh key. type: string required: false register_target: doc: short_help: The name of the key to register the public key content under. type: string required: true frecklets: - frecklet: name: register-public-ssh-key.at.yml type: ansible-tasklist resources: ansible-tasklist: - internally-register-public-ssh-key.at.yml - register-public-ssh-key.at.yml vars: __path_to_key__: '{{:: path ::}}' __key_content__: '{{:: key_content ::}}' __become__: '{{:: user | false_if_empty ::}}' __become_user__: '{{:: user ::}}' - register-var: register-target: '{{:: register_target ::}}' var_name: __temp_ssh_key_content__
frecklecute register-public-ssh-key-content --help Usage: frecklecute register-public-ssh-key-content [OPTIONS] Registers the content of a public ssh key to a variable. Either the 'path' or the 'key_content' argument must be provided Options: --register-target REGISTER_TARGET The name of the key to register the public key content under. [required] --key-content KEY_CONTENT The content of the ssh key. --path PATH The (absolute) path to the public ssh key. --user USER The name of the user who owns the ssh key. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.register_public_ssh_key_content.RegisterPublicSshKeyContent # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class RegisterPublicSshKeyContent(AutoPycklet): """Registers the content of a public ssh key to a variable. Either the 'path' or the 'key_content' argument must be provided Args: key_content: The content of the ssh key. path: The (absolute) path to the public ssh key. register_target: The name of the key to register the public key content under. user: The name of the user who owns the ssh key. """ FRECKLET_ID = "register-public-ssh-key-content" key_content: str = None path: str = None register_target: str = None user: str = None def __post_init__(self): super(RegisterPublicSshKeyContent, self).__init__(var_names=["key_content", "path", "register_target", "user"]) frecklet_class = RegisterPublicSshKeyContent
# -*- coding: utf-8 -*- # # module path: pycklets.register_public_ssh_key_content.RegisterPublicSshKeyContent # from pyckles import AutoPycklet class RegisterPublicSshKeyContent(AutoPycklet): """Registers the content of a public ssh key to a variable. Either the 'path' or the 'key_content' argument must be provided Args: key_content: The content of the ssh key. path: The (absolute) path to the public ssh key. register_target: The name of the key to register the public key content under. user: The name of the user who owns the ssh key. """ FRECKLET_ID = "register-public-ssh-key-content" def __init__(self, key_content=None, path=None, register_target=None, user=None): super(RegisterPublicSshKeyContent, self).__init__(var_names=["key_content", "path", "register_target", "user"]) self._key_content = key_content self._path = path self._register_target = register_target self._user = user @property def key_content(self): return self._key_content @key_content.setter def key_content(self, key_content): self._key_content = key_content @property def path(self): return self._path @path.setter def path(self, path): self._path = path @property def register_target(self): return self._register_target @register_target.setter def register_target(self, register_target): self._register_target = register_target @property def user(self): return self._user @user.setter def user(self, user): self._user = user frecklet_class = RegisterPublicSshKeyContent