Defined Type: mollyguard::checks::libvirt

Defined in:
manifests/checks/libvirt.pp

Overview

use this to add check for running libbvirt domains to molly-guard

Parameters:

  • destination (String)

    directory where to put the check (mandatory)

  • check_name (String) (defaults to: $title)

    name of the check (defaults to $title)

  • sort (String) (defaults to: '20')

    sort parameter (defaults to ‘20’)

  • owner (String) (defaults to: 'root')

    owner of the check (file), defaults to ‘root’

  • group (String) (defaults to: 'root')

    group of the check (file), defaults to ‘root’

  • mode (String) (defaults to: '0755')

    mode of the check (file), defaults to ‘0755’

  • options (String) (defaults to: '--all')

    options to add to virsh list command to select listed domains. defaults to ‘–all’ set this to ‘–state-running –state-paused –state-other’ if you do not care about shutdown instances.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'manifests/checks/libvirt.pp', line 24

define mollyguard::checks::libvirt (
  String  $destination,
  String  $check_name = $title,
  String  $sort       = '20',
  String  $owner      = 'root',
  String  $group      = 'root',
  String  $mode       = '0755',
  String  $options    = '--all',
) {

  file {"${destination}/${sort}-${check_name}":
    ensure  => 'present',
    owner   => $owner,
    group   => $group,
    mode    => $mode,
    content => epp('mollyguard/checks/check-libvirt.sh.epp', {'options' => $options }),
  }
}