Puppet Class: cfweb::internal::cidrepos

Defined in:
manifests/internal/cidrepos.pp

Overview



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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'manifests/internal/cidrepos.pp', line 6

class cfweb::internal::cidrepos {

    include cfsystem
    include cfweb::global

    #====
    if $cfweb::global::ruby {
        $ruby_release = $::facts['os']['name'] ? {
            'Debian' => $::cfsystem::debian::release ? {
                'jessie' => 'trusty',
                default => 'xenial',
            },
            'Ubuntu' => $::cfsystem::ubuntu::release,
        }

        apt::key { 'brightbox-ruby':
            id      => '80F70E11F0F0D5F10CB20E62F5DA5F09C3173AA6',
            content => file('cfweb/brightbox_rubyng_signing.key'),
        }

        apt::source { 'brightbox-ruby':
            location =>'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu',
            release  => $ruby_release,
            repos    => 'main',
            pin      => $cfsystem::apt_pin,
            require  => Apt::Key['brightbox-ruby'],
        }
    }

    #====
    if $cfweb::global::php {
        case $::facts['os']['name'] {
            'Debian' : {
                apt::key { 'sury-php':
                    id      => 'DF3D585DB8F0EB658690A554AC0E47584A7A714D',
                    content => file('cfweb/sury_signing.key'),
                }

                apt::source { 'sury-php':
                    location =>'http://packages.sury.org/php',
                    release  => $::cfsystem::debian::release,
                    repos    => 'main',
                    pin      => $cfsystem::apt_pin,
                    require  => Apt::Key['sury-php'],
                }
            }
            'Ubuntu' : {
                apt::key { 'sury-php':
                    id      => '14AA40EC0831756756D7F66C4F4EA0AAE5267A6C',
                    content => file('cfweb/sury_ppa_signing.key'),
                }

                apt::source { 'sury-php':
                    location =>'http://ppa.launchpad.net/ondrej/php/ubuntu',
                    release  => $::cfsystem::ubuntu::release,
                    repos    => 'main',
                    pin      => $cfsystem::apt_pin,
                    require  => Apt::Key['sury-php'],
                }
            }
            default : { fail('Unsupported OS') }
        }
    }
    #====
    if $cfweb::global::erlang {
        file { '/etc/apt/preferences.d/erlang-solutions.pref':
            content => [
                'Explanation: cfweb: erlang',
                'Package: *',
                'Pin: origin binaries.erlang-solutions.com',
                "Pin-Priority: ${cfsystem::apt_pin}",
                '',
            ].join("\n"),
        }
        -> file { '/etc/apt/sources.list.d/erlang-solutions.list':
            content => '',
            replace => false,
        }
    }
}