arillso.system.systemd_unit role – Manage systemd units on various systems.

Note

This role is part of the arillso.system collection (version 0.0.34).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install arillso.system.

To use it in a playbook, specify: arillso.system.systemd_unit.

Entry point main – Manage systemd units on various systems.

Synopsis

  • This role configures and manages systemd units across different systems.

  • It allows for the creation, modification, and deletion of systemd unit files and their override configurations.

Parameters

Parameter

Comments

systemd_unit_directory

path

The directory where systemd unit files are stored. Defaults to ‘/etc/systemd/system’.

Default: "/etc/systemd/system"

systemd_unit_file

path

Full path of the systemd unit file. Automatically constructed from the unit name and type.

systemd_unit_generic_options

list / elements=string

Generic options for systemd units, applied regardless of the unit type.

Default: []

systemd_unit_install_options

list / elements=string

Options related to the ‘Install’ section of a systemd unit file.

Default: []

systemd_unit_name

string / required

The name of the systemd unit to be managed.

systemd_unit_options

list / elements=string

Specific options for the systemd unit, dependent on the unit type and configuration.

Default: []

systemd_unit_override_directory

path

Directory for the systemd unit override files, specific to the unit name and type.

systemd_unit_override_file

path

Full path for the systemd unit override file. Automatically constructed using the override directory and override name.

systemd_unit_override_name

string

Name of the override file for the systemd unit.

systemd_unit_type

string / required

The type of the systemd unit (e.g., ‘service’, ‘timer’).

Choices:

  • "service"

  • "timer"

systemd_unit_types_supported

list / elements=string

List of supported systemd unit types.

Default: ["service", "timer"]