init-service-disabled

Example:

# Disable the 'apache2' service.
- init-service-disabled:
    name: apache2

Description

Make sure an init service is disabled.

Variables

Name Type Default Description

name

string --

The name of the service. Required

Examples

Example 1

Disable the 'apache2' service.

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

This doesn't stop the service if it is currently running.

Code

doc:
  short_help: Disable init-service.
  help: |
    Make sure an init service is disabled.
  examples:
  - title: Disable the 'apache2' service.
    desc: |
      This doesn't stop the service if it is currently running.
    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:
    name: '{{:: name ::}}'
    enabled: false
frecklecute init-service-disabled --help

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

  Make sure an init service is disabled.

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


#
# module path: pycklets.init_service_disabled.InitServiceDisabled
#


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

@dataclass
class InitServiceDisabled(AutoPycklet):
    """Make sure an init service is disabled.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-disabled"

    name: str = None


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


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


#
# module path: pycklets.init_service_disabled.InitServiceDisabled
#


from pyckles import AutoPycklet

class InitServiceDisabled(AutoPycklet):
    """Make sure an init service is disabled.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-disabled"

    def __init__(self, name=None):

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