ssh-key-added-to-service

Description

Ensure an ssh key exists.

Variables

Name Type Default Description

path

n/a --

The path to the (private) ssh key. Required

services

n/a --

n/a Required

user

string --

The name of the user.

Code

doc:
  short_help: Ensure an ssh key exists.

args:
  user:
    doc:
      short_help: The name of the user.
    type: string
    required: false
  path:
    doc:
      short_help: The path to the (private) ssh key.

frecklets:
- ssh-key-exists:
    user: '{{:: user ::}}'
    path_to_key: '{{:: path ::}}'
- frecklet:
    name: add-ssh-key-to-services.at.yml
    type: ansible-tasklist
  task:
    include-type: include
    delegate_to: localhost
  vars:
    __path_to_key__: '{{:: path ::}}'
    __services__: '{{:: services ::}}'
frecklecute --community ssh-key-added-to-service --help

Usage: frecklecute ssh-key-added-to-service [OPTIONS]

  Ensure an ssh key exists.

Options:
  --path PATH          The path to the (private) ssh key.  [required]
  --services SERVICES  n/a  [required]
  --user USER          The name of the user.
  --help               Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.ssh_key_added_to_service.SshKeyAddedToService
#


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

@dataclass
class SshKeyAddedToService(AutoPycklet):
    """Ensure an ssh key exists.

       Args:
         path: The path to the (private) ssh key.
         services: n/a
         user: The name of the user.

    """

    FRECKLET_ID = "ssh-key-added-to-service"

    path: str = None
    services: str = None
    user: str = None


    def __post_init__(self):
        super(SshKeyAddedToService, self).__init__(var_names=["path", "services", "user"])


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


#
# module path: pycklets.ssh_key_added_to_service.SshKeyAddedToService
#


from pyckles import AutoPycklet

class SshKeyAddedToService(AutoPycklet):
    """Ensure an ssh key exists.

       Args:
         path: The path to the (private) ssh key.
         services: n/a
         user: The name of the user.

    """

    FRECKLET_ID = "ssh-key-added-to-service"

    def __init__(self, path=None, services=None, user=None):

        super(SshKeyAddedToService, self).__init__(var_names=["path", "services", "user"])
        self._path = path
        self._services = services
        self._user = user

    @property
    def path(self):
        return self._path

    @path.setter
    def path(self, path):
        self._path = path

    @property
    def services(self):
        return self._services

    @services.setter
    def services(self, services):
        self._services = services

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

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



frecklet_class = SshKeyAddedToService