ssh-keys-authorized

Description

n/a

Variables

Name Type Default Description

keys

list --

The list of public keys to add. Required

user

string --

The name of the user.

Code

args:
  user:
    doc:
      short_help: The name of the user.
    type: string
    required: false
    cli:
      param_decls:
      - --user
      - -u
  keys:
    doc:
      short_help: The list of public keys to add.
    type: list
    schema:
      type: string
    empty: false
    required: true
    cli:
      param_decls:
      - --key
      - -k
      metavar: KEY

frecklets:
- frecklet:
    name: ssh-keys-authorized.at.yml
    type: ansible-tasklist
    properties:
      idempotent: true
      elevated: '{{:: user | false_if_empty ::}}'
      internet: false
    desc:
      short: "add ssh key to authorized keys{%:: if user ::%}for user '{{:: user ::}}{%::\
        \ endif ::%}.'"
  vars:
    _become: '{{:: user | false_if_empty ::}}'
    _user: '{{:: user ::}}'
    _keys: '{{:: keys ::}}'
frecklecute ssh-keys-authorized --help

Usage: frecklecute ssh-keys-authorized [OPTIONS]

  n/a

Options:
  -k, --key KEY    The list of public keys to add.  [required]
  -u, --user USER  The name of the user.
  --help           Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.ssh_keys_authorized.SshKeysAuthorized
#


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

@dataclass
class SshKeysAuthorized(AutoPycklet):
    """No documentation available.

       Args:
         keys: The list of public keys to add.
         user: The name of the user.

    """

    FRECKLET_ID = "ssh-keys-authorized"

    keys: List = None
    user: str = None


    def __post_init__(self):
        super(SshKeysAuthorized, self).__init__(var_names=["keys", "user"])


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


#
# module path: pycklets.ssh_keys_authorized.SshKeysAuthorized
#


from pyckles import AutoPycklet

class SshKeysAuthorized(AutoPycklet):
    """No documentation available.

       Args:
         keys: The list of public keys to add.
         user: The name of the user.

    """

    FRECKLET_ID = "ssh-keys-authorized"

    def __init__(self, keys=None, user=None):

        super(SshKeysAuthorized, self).__init__(var_names=["keys", "user"])
        self._keys = keys
        self._user = user

    @property
    def keys(self):
        return self._keys

    @keys.setter
    def keys(self, keys):
        self._keys = keys

    @property
    def user(self):
        return self._user

    @user.setter
    def user(self, user):
        self._user = user



frecklet_class = SshKeysAuthorized