init-service-stopped

Example:

# Stop the 'apache2' service.
- init-service-stopped:
    name: apache2

Description

Make sure an init service is stopped.

Variables

Name Type Default Description

name

string --

The name of the service. Required

Examples

Example 1

Stop the 'apache2' service.

Code
- init-service-stopped:
    name: apache2
Description

This doesn't enable the 'apache2' service if it is currently enabled.

Code

doc:
  short_help: Stop init-service.
  help: |
    Make sure an init service is stopped.
  examples:
  - title: Stop the 'apache2' service.
    desc: |
      This doesn't enable the 'apache2' service if it is currently enabled.
    vars:
      name: apache2
args:
  name:
    doc:
      short_help: The name of the service.
    type: string
    required: true
    cli:
      metavar: SERVICE_NAME
      param_type: argument

meta:
  tags:
  - init
  - systemd
  - service

frecklets:
- init-service-configured:
    started: false
    name: '{{:: name ::}}'
frecklecute init-service-stopped --help

Usage: frecklecute init-service-stopped [OPTIONS] SERVICE_NAME

  Make sure an init service is stopped.

Options:
  --help  Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.init_service_stopped.InitServiceStopped
#


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

@dataclass
class InitServiceStopped(AutoPycklet):
    """Make sure an init service is stopped.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-stopped"

    name: str = None


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


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


#
# module path: pycklets.init_service_stopped.InitServiceStopped
#


from pyckles import AutoPycklet

class InitServiceStopped(AutoPycklet):
    """Make sure an init service is stopped.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-stopped"

    def __init__(self, name=None):

        super(InitServiceStopped, 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 = InitServiceStopped