Puppet Class: libvirt::service

Inherits:
libvirt
Defined in:
manifests/service.pp

Overview

libvirt::service

Parameters:

  • service_name (String) (defaults to: $libvirt::service_name)

    Service name for libvirt. The default value is Distribution specific and inherited from ::libvirt class.

  • service_ensure (String) (defaults to: $libvirt::service_ensure)

    Whether the service should be running. Defaults to 'running'

  • service_enable (Boolean) (defaults to: $libvirt::service_enable)

    Whether the service should be enabled. Defaults to true

  • manage_service (Boolean) (defaults to: $libvirt::manage_service)

    Whether the service should be managed at all. Defaults to true



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'manifests/service.pp', line 21

class libvirt::service(
  String  $service_name   = $libvirt::service_name,
  String  $service_ensure = $libvirt::service_ensure,
  Boolean $service_enable = $libvirt::service_enable,
  Boolean $manage_service = $libvirt::manage_service,
) inherits libvirt {

  if $manage_service {
    Libvirtd_conf <| |> ~> Service['libvirtd']

    service {'libvirtd':
      ensure => $service_ensure,
      name   => $service_name,
      enable => $service_enable,
    }
  }
}