Puppet Class: swift::ring

Defined in:
modules/swift/manifests/ring.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:



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
# File 'modules/swift/manifests/ring.pp', line 2

class swift::ring (
    String $swift_cluster,
) {
    ensure_packages('bzip2')

    file { '/usr/local/bin/swift_check_ring_tarball.sh':
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => "puppet:///modules/${module_name}/swift_check_ring_tarball.sh",
    }

    wmflib::dir::mkdir_p('/var/spool/swift_ring')

    # lint:ignore:puppet_url_without_modules
    file { '/var/spool/swift_ring/rings.tar.bz2':
        ensure       => present,
        source       => "puppet:///volatile/swift/${swift_cluster}/new_rings.tar.bz2",
        show_diff    => false,
        validate_cmd => '/usr/local/bin/swift_check_ring_tarball.sh %',
    }
    exec { 'tar -xf /var/spool/swift_ring/rings.tar.bz2 --one-top-level=/etc/swift':
        path        => '/usr/bin:/bin',
        refreshonly => true,
        subscribe   => File['/var/spool/swift_ring/rings.tar.bz2'],
    }
    # lint:endignore
}