Puppet Class: profile::bigtop::apt

Defined in:
modules/profile/manifests/bigtop/apt.pp

Overview

Parameters:

  • pin_release (Boolean) (defaults to: lookup('profile::bigtop::apt::pin_release', { 'default_value' => true }))
  • component (String) (defaults to: lookup('profile::bigtop::apt::component', { 'default_value' => 'bigtop15' }))


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
# File 'modules/profile/manifests/bigtop/apt.pp', line 22

class profile::bigtop::apt (
    Boolean $pin_release = lookup('profile::bigtop::apt::pin_release', { 'default_value' => true }),
    String $component = lookup('profile::bigtop::apt::component', { 'default_value' => 'bigtop15' }),
){
    apt::repository { "thirdparty-${component}":
        uri        => 'http://apt.wikimedia.org/wikimedia',
        dist       => "${::lsbdistcodename}-wikimedia",
        components => "thirdparty/${component}",
        notify     => Exec['apt_update_hadoop_component'],
    }

    $ensure_pin = $pin_release ? {
      true  => 'present',
      false => 'absent',
    }

    if $pin_release {
        apt::pin { "thirdparty-${component}":
            ensure   => $ensure_pin,
            pin      => "release c=thirdparty/${component}",
            priority => 1002,
            notify   => Exec['apt_update_hadoop_component'],
        }
    }

    # First installs can trip without this.
    exec {'apt_update_hadoop_component':
        command     => '/usr/bin/apt-get update',
        refreshonly => true,
    }

}