ssh-key-is-absent

Description

Ensures an ssh key is absent for a user.

Variables

Name Type Default Description

path_to_key

string --

The path to the ssh key. Required

user

string --

The name of the user.

Code

doc:
  short_help: Ensures an ssh key is absent for a user.

args:
  user:
    doc:
      short_help: The name of the user.
    type: string
    required: false
  path_to_key:
    doc:
      short_help: The path to the ssh key.
    type: string
    required: true

frecklets:
- path-is-absent:
    path: '{{:: path_to_key ::}}'
    become: '{{:: user | false_if_empty ::}}'
frecklecute ssh-key-is-absent --help

Usage: frecklecute ssh-key-is-absent [OPTIONS]

  Ensures an ssh key is absent for a user.

Options:
  --path-to-key PATH_TO_KEY  The path to the ssh key.  [required]
  --user USER                The name of the user.
  --help                     Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.ssh_key_is_absent.SshKeyIsAbsent
#


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

@dataclass
class SshKeyIsAbsent(AutoPycklet):
    """Ensures an ssh key is absent for a user.

       Args:
         path_to_key: The path to the ssh key.
         user: The name of the user.

    """

    FRECKLET_ID = "ssh-key-is-absent"

    path_to_key: str = None
    user: str = None


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


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


#
# module path: pycklets.ssh_key_is_absent.SshKeyIsAbsent
#


from pyckles import AutoPycklet

class SshKeyIsAbsent(AutoPycklet):
    """Ensures an ssh key is absent for a user.

       Args:
         path_to_key: The path to the ssh key.
         user: The name of the user.

    """

    FRECKLET_ID = "ssh-key-is-absent"

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

        super(SshKeyIsAbsent, self).__init__(var_names=["path_to_key", "user"])
        self._path_to_key = path_to_key
        self._user = user

    @property
    def path_to_key(self):
        return self._path_to_key

    @path_to_key.setter
    def path_to_key(self, path_to_key):
        self._path_to_key = path_to_key

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

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



frecklet_class = SshKeyIsAbsent