Puppet Class: helix::debian

Inherits:
helix::params
Defined in:
manifests/debian.pp

Overview

Class: helix::debian

Manages the custom debian perforce repo and installs the specified package

Parameters


  • ‘pkgname`

This required parameter specifies the package to be installed

  • ‘pubkey_url`

  • ‘p4_key_fingerprint`

  • ‘p4_distro_location`

  • ‘p4_distro_release`

Parameters:

  • pkgname (Any)
  • pubkey_url (Any) (defaults to: $helix::params::pubkey_url)
  • p4_key_fingerprint (Any) (defaults to: $helix::params::p4_key_fingerprint)
  • p4_distro_location (Any) (defaults to: $helix::params::p4_distro_location)
  • p4_distro_release (Any) (defaults to: $helix::params::p4_distro_release)


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'manifests/debian.pp', line 16

class helix::debian (
  $pkgname,
  $pubkey_url            = $helix::params::pubkey_url,
  $p4_key_fingerprint    = $helix::params::p4_key_fingerprint,
  $p4_distro_location    = $helix::params::p4_distro_location,
  $p4_distro_release     = $helix::params::p4_distro_release,
) inherits helix::params {

  include apt

  if !defined(Apt::Key['perforce-key']) {
    apt::key { 'perforce-key':
      ensure => present,
      id     => $p4_key_fingerprint,
      source => $pubkey_url,
    }
  }

  if !defined(Apt::Source['perforce-apt-config']) {
    apt::source { 'perforce-apt-config':
      comment  => 'This is the Perforce debian distribution configuration file',
      location => $p4_distro_location,
      release  => $p4_distro_release,
      repos    => 'release',
      require  => Apt::Key['perforce-key'],
      include  => {
        'src' => false,
        'deb' => true,
      },
    }
  }

  if !defined(Package[$pkgname]) {
    package { $pkgname:
      ensure  => installed,
      require => Exec['apt_update'],
    }
  }

}