frecklet-file

Description

A minimal (single task) frecklet.

Variables

Name Type Default Description

frecklet_name

string --

The name of the frecklet. Required

path

string --

The path to the file. Required

frecklet_vars

dict --

The frecklet vars.

group

string --

The group of the file.

mode

string --

The permissions of the file.

owner

string --

The owner of the file.

Code

doc:
  short_help: A minimal (single task) frecklet.

args:
  frecklet_name:
    doc:
      short_help: The name of the frecklet.
    type: string
    required: true
  frecklet_vars:
    doc:
      short_help: The frecklet vars.
    type: dict
    keyschema:
      type: string
    empty: true
    required: false
  _import:
  - file-with-content
frecklets:
- file-with-content:
    path: '{{:: path ::}}'
    group: '{{:: group ::}}'
    owner: '{{:: owner ::}}'
    mode: '{{:: mode ::}}'
    content: |-
      frecklets:
        - {{:: frecklet_name ::}}{%:: if frecklet_vars is defined and frecklet_vars ::%}:
      {{:: frecklet_vars | to_yaml(true, 6) ::}}
      {%:: endif ::%}
frecklecute frecklet-file --help

Usage: frecklecute frecklet-file [OPTIONS] PATH

  A minimal (single task) frecklet.

Options:
  --frecklet-name FRECKLET_NAME  The name of the frecklet.  [required]
  --frecklet-vars FRECKLET_VARS  The frecklet vars.
  --group GROUP                  The group of the file.
  --mode MODE                    The permissions of the file.
  --owner USER                   The owner of the file.
  --help                         Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.frecklet_file.FreckletFile
#


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

@dataclass
class FreckletFile(AutoPycklet):
    """A minimal (single task) frecklet.

       Args:
         frecklet_name: The name of the frecklet.
         frecklet_vars: The frecklet vars.
         group: The group of the file.
         mode: The permissions of the file.
         owner: The owner of the file.
         path: The path to the file.

    """

    FRECKLET_ID = "frecklet-file"

    frecklet_name: str = None
    frecklet_vars: Dict = None
    group: str = None
    mode: str = None
    owner: str = None
    path: str = None


    def __post_init__(self):
        super(FreckletFile, self).__init__(var_names=["frecklet_name", "frecklet_vars", "group", "mode", "owner", "path"])


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


#
# module path: pycklets.frecklet_file.FreckletFile
#


from pyckles import AutoPycklet

class FreckletFile(AutoPycklet):
    """A minimal (single task) frecklet.

       Args:
         frecklet_name: The name of the frecklet.
         frecklet_vars: The frecklet vars.
         group: The group of the file.
         mode: The permissions of the file.
         owner: The owner of the file.
         path: The path to the file.

    """

    FRECKLET_ID = "frecklet-file"

    def __init__(self, frecklet_name=None, frecklet_vars=None, group=None, mode=None, owner=None, path=None):

        super(FreckletFile, self).__init__(var_names=["frecklet_name", "frecklet_vars", "group", "mode", "owner", "path"])
        self._frecklet_name = frecklet_name
        self._frecklet_vars = frecklet_vars
        self._group = group
        self._mode = mode
        self._owner = owner
        self._path = path

    @property
    def frecklet_name(self):
        return self._frecklet_name

    @frecklet_name.setter
    def frecklet_name(self, frecklet_name):
        self._frecklet_name = frecklet_name

    @property
    def frecklet_vars(self):
        return self._frecklet_vars

    @frecklet_vars.setter
    def frecklet_vars(self, frecklet_vars):
        self._frecklet_vars = frecklet_vars

    @property
    def group(self):
        return self._group

    @group.setter
    def group(self, group):
        self._group = group

    @property
    def mode(self):
        return self._mode

    @mode.setter
    def mode(self, mode):
        self._mode = mode

    @property
    def owner(self):
        return self._owner

    @owner.setter
    def owner(self, owner):
        self._owner = owner

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

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



frecklet_class = FreckletFile