Puppet Class: openstack::serverpackages::queens::stretch

Defined in:
modules/openstack/manifests/serverpackages/queens/stretch.pp

Overview



1
2
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
66
67
68
69
70
71
72
73
74
# File 'modules/openstack/manifests/serverpackages/queens/stretch.pp', line 1

class openstack::serverpackages::queens::stretch(
){
    $stretch_bpo_packages = [
      'librados2',
      'librgw2',
      'librbd1',
      'python-rados',
      'python-rbd',
      'ceph-common',
      'python-cephfs',
      'libradosstriper1',
    ]

    apt::pin { 'openstack-queens-stretch-bpo':
        package  => join($stretch_bpo_packages, ' '),
        pin      => 'release n=stretch-backports',
        priority => '1002',
    }

    # Don't install systemd from stretch-backports or bpo -- T247013
    apt::pin { 'systemd':
        pin      => 'release n=stretch',
        package  => 'systemd libpam-systemd',
        priority => '1001',
    }

    apt::repository { 'openstack-queens-stretch':
        uri        => 'http://mirrors.wikimedia.org/osbpo',
        dist       => 'stretch-queens-backports',
        components => 'main',
        source     => false,
        keyfile    => 'puppet:///modules/openstack/serverpackages/osbpo-pubkey.gpg',
        notify     => Exec['openstack-queens-stretch-apt-upgrade'],
    }

    apt::repository { 'openstack-queens-stretch-nochange':
        uri        => 'http://mirrors.wikimedia.org/osbpo',
        dist       => 'stretch-queens-backports-nochange',
        components => 'main',
        source     => false,
        keyfile    => 'puppet:///modules/openstack/serverpackages/osbpo-pubkey.gpg',
        notify     => Exec['openstack-queens-stretch-apt-upgrade'],
    }

    # ensure apt can see the repo before any further Package[] declaration
    # so this proper repo/pinning configuration applies in the same puppet
    # agent run
    exec { 'openstack-queens-stretch-apt-upgrade':
        command     => '/usr/bin/apt-get update',
        require     => [Apt::Repository['openstack-queens-stretch'],
                        Apt::Repository['openstack-queens-stretch-nochange']],
        subscribe   => [Apt::Repository['openstack-queens-stretch'],
                        Apt::Repository['openstack-queens-stretch-nochange']],
        refreshonly => true,
        logoutput   => true,
    }
    Exec['openstack-queens-stretch-apt-upgrade'] -> Package <| |>

    # Some of these may be left over from an old python2 (pre-queens)
    #  install.  In particular, if python2 privsep is present then
    #  /etc/alternatives links to the python2 version which doesn't
    #  work very well.
    $absent_packages = [
        'python-neutron',
        'python-nova',
        'python-oslo.privsep',
        'python-os-vif',
        'python-os-brick',
    ]

    package { $absent_packages:
        ensure  => 'absent',
    }
}