Defined Type: kvm::image

Defined in:
manifests/image.pp

Summary

Downloads a VM base image

Overview

Parameters:

  • url (String)

    sets the source URL for the image

  • checksum (String)

    sets the checksum for the image

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

    sets the name of the image

  • base_dir (String) (defaults to: $kvm::image_path)

    sets the parent directory for images



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'manifests/image.pp', line 7

define kvm::image (
  String $url,
  String $checksum,
  String $image_name = $title,
  String $base_dir = $kvm::image_path,
) {
  file { "${base_dir}/${image_name}":
    ensure         => file,
    source         => $url,
    checksum_value => $checksum,
    mode           => '0644',
    owner          => 'root',
    group          => 'root',
  }
}