lxd-container-absent

Example:

# Remove container 'my-container-name' if it exists.
- lxd-container-absent:
    name: my-container-name

Description

Makes sure an lxd container with a specific is absent on this machine.

Variables

Name Type Default Description

name

string --

A name to identify this container with. Required

Examples

Example 1

Remove container 'my-container-name' if it exists.

Code
- lxd-container-absent:
    name: my-container-name

Code

doc:
  short_help: Makes sure an lxd container with a specific is absent on this machine.
  examples:
  - title: Remove container 'my-container-name' if it exists.
    vars:
      name: my-container-name

args:
  name:
    doc:
      short_help: A name to identify this container with.
    type: string
    required: true

frecklets:
- frecklet:
    name: lxd_container
    type: ansible-module
    desc:
      short: "remove container '{{:: name ::}}'"
    properties:
      idempotent: false
  vars:
    name: '{{:: name ::}}'
    state: absent
frecklecute lxd-container-absent --help

Usage: frecklecute lxd-container-absent [OPTIONS]

  Makes sure an lxd container with a specific is absent on this machine.

Options:
  --name NAME  A name to identify this container with.  [required]
  --help       Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.lxd_container_absent.LxdContainerAbsent
#


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

@dataclass
class LxdContainerAbsent(AutoPycklet):
    """Makes sure an lxd container with a specific is absent on this machine.

       Args:
         name: A name to identify this container with.

    """

    FRECKLET_ID = "lxd-container-absent"

    name: str = None


    def __post_init__(self):
        super(LxdContainerAbsent, self).__init__(var_names=["name"])


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


#
# module path: pycklets.lxd_container_absent.LxdContainerAbsent
#


from pyckles import AutoPycklet

class LxdContainerAbsent(AutoPycklet):
    """Makes sure an lxd container with a specific is absent on this machine.

       Args:
         name: A name to identify this container with.

    """

    FRECKLET_ID = "lxd-container-absent"

    def __init__(self, name=None):

        super(LxdContainerAbsent, self).__init__(var_names=["name"])
        self._name = name

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name



frecklet_class = LxdContainerAbsent