Puppet Class: bazinga::apt

Defined in:
manifests/apt.pp

Overview

Class: bazinga::apt



3
4
5
6
7
8
9
10
11
12
13
14
15
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
56
57
58
59
60
61
62
63
64
65
# File 'manifests/apt.pp', line 3

class bazinga::apt {

  case $::operatingsystem {
    'ubuntu': {
      apt::source { 'ubuntu':
        location => 'http://archive.ubuntu.com/ubuntu/',
        release  => $::lsbdistcodename,
        repos    => 'main universe multiverse restricted',
      }

      apt::source { 'ubuntu-security':
        location => 'http://archive.ubuntu.com/ubuntu/',
        release  => "${::lsbdistcodename}-security",
        repos    => 'main universe multiverse restricted',
      }

      apt::source { 'ubuntu-updates':
        location => 'http://archive.ubuntu.com/ubuntu/',
        release  => "${::lsbdistcodename}-updates",
        repos    => 'main universe multiverse restricted',
      }

      apt::source { 'ondrej-php5':
        location => 'http://ppa.launchpad.net/ondrej/php5/ubuntu',
        release  => $::lsbdistcodename,
        repos    => 'main',
      }

      apt::key { 'ondrej-php5':
        key        => 'E5267A6C',
        key_server => 'keyserver.ubuntu.com',
      }
    }
    'debian': {
      apt::source { 'debian':
        location => 'http://ftp.fr.debian.org/debian',
        release  => 'stable',
        repos    => 'main contrib non-free',
      }

      $dotdeb_release = $::lsbdistcodename ? {
        'squeeze' => 'squeeze-php54',
        default   => $::lsbdistcodename
      }

      apt::source { 'dotdeb':
        location => 'http://packages.dotdeb.org',
        release  => $dotdeb_release,
        repos    => 'all',
        key      => '89DF5277',
      }

      apt::key { 'dotdeb':
        key        => '89DF5277',
        key_source => 'http://www.dotdeb.org/dotdeb.gpg',
      }
    }
    default: {
    }
  }

  Exec['apt_update'] -> Package <||>
}