init-service-reloaded

Example:

# Reload the 'apache2' service.
- init-service-reloaded:
    name: apache2

Description

Reload init service.

Variables

Name Type Default Description

name

string --

The name of the service. Required

Examples

Example 1

Reload the 'apache2' service.

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

This doesn't enable the apache2 service, but starts it if it isn't already running.

Code

doc:
  short_help: Reload init service.
  examples:
  - title: Reload the 'apache2' service.
    desc: |
      This doesn't enable the apache2 service, but starts it if it isn't already 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:
  - service
  - systemd
  - init

frecklets:
- task:
    become: true
  frecklet:
    type: ansible-module
    name: service
    desc:
      short: 'reload service: {{:: name ::}}'
      references:
        "'service' Ansible module'": https://docs.ansible.com/ansible/latest/modules/service_module.html
    properties:
      idempotent: true
      internet: false
      elevated: true
  vars:
    name: '{{:: name ::}}'
    state: reloaded
frecklecute init-service-reloaded --help

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

  Reload init service.

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


#
# module path: pycklets.init_service_reloaded.InitServiceReloaded
#


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

@dataclass
class InitServiceReloaded(AutoPycklet):
    """Reload init service.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-reloaded"

    name: str = None


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


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


#
# module path: pycklets.init_service_reloaded.InitServiceReloaded
#


from pyckles import AutoPycklet

class InitServiceReloaded(AutoPycklet):
    """Reload init service.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-reloaded"

    def __init__(self, name=None):

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