Puppet Class: profile::ceph::backup::s3_local

Defined in:
modules/profile/manifests/ceph/backup/s3_local.pp

Overview

Parameters:

  • ensure (WMFlib::Ensure) (defaults to: lookup('profile::ceph::backup::s3_local:ensure',default_value => absent))
  • backup_dir (Stdlib::Unixpath) (defaults to: lookup('profile::ceph::backup::s3_local:ensure',default_value => '/srv/postgresql_backups'))
  • sources (Hash[String,Hash[String,String]]) (defaults to: lookup('profile::ceph::backup::s3_local:sources',default_value => {}))


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
# File 'modules/profile/manifests/ceph/backup/s3_local.pp', line 21

class profile::ceph::backup::s3_local (
    WMFlib::Ensure                   $ensure     = lookup('profile::ceph::backup::s3_local:ensure',default_value => absent),
    Stdlib::Unixpath                 $backup_dir = lookup('profile::ceph::backup::s3_local:ensure',default_value => '/srv/postgresql_backups'),
    Hash[String,Hash[String,String]] $sources    = lookup('profile::ceph::backup::s3_local:sources',default_value => {}),
) {
    ensure_packages('rclone')

    file { $backup_dir:
        ensure => directory,
        owner  => 'backup',
        group  => 'backup',
        mode   => '0600',
    }
    file { "${backup_dir}/rclone.conf":
        ensure  => $ensure,
        owner   => 'backup',
        group   => 'backup',
        mode    => '0600',
        content => epp ('profile/ceph/backup/s3_local/rclone.conf.epp', {
            sources => $sources,
        }),
    }

    backup::set { 'data-platform-postgres-s3': }
}