Puppet lint fixes
Also move contents of /etc/bup-excludes into a file Change-Id: I206c08d05114cdacb18d00e4a4578679398990ec Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-on: https://review.openstack.org/15841 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
ca5b3448f6
commit
09fbdd5715
12
modules/bup/files/etc/bup-excludes
Normal file
12
modules/bup/files/etc/bup-excludes
Normal file
@ -0,0 +1,12 @@
|
||||
/proc/*
|
||||
/sys/*
|
||||
/dev/*
|
||||
/tmp/*
|
||||
/floppy/*
|
||||
/cdrom/*
|
||||
/var/spool/squid/*
|
||||
/var/spool/exim/*
|
||||
/media/*
|
||||
/mnt/*
|
||||
/var/agentx/*
|
||||
/run/*
|
@ -1,23 +1,12 @@
|
||||
# Class: bup
|
||||
#
|
||||
class bup {
|
||||
package { "bup":
|
||||
ensure => present
|
||||
}
|
||||
|
||||
file { "/etc/bup-excludes":
|
||||
package { 'bup':
|
||||
ensure => present,
|
||||
content => "/proc/*
|
||||
/sys/*
|
||||
/dev/*
|
||||
/tmp/*
|
||||
/floppy/*
|
||||
/cdrom/*
|
||||
/var/spool/squid/*
|
||||
/var/spool/exim/*
|
||||
/media/*
|
||||
/mnt/*
|
||||
/var/agentx/*
|
||||
/run/*
|
||||
"
|
||||
}
|
||||
|
||||
file { '/etc/bup-excludes':
|
||||
ensure => present,
|
||||
content => 'puppet:///modules/bup/etc/bup-exculdes',
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
define bup::site($backup_user, $backup_server) {
|
||||
cron { "bup-$name":
|
||||
user => root,
|
||||
hour => "5",
|
||||
minute => "37",
|
||||
command => "tar -X /etc/bup-excludes -cPf - / | bup split -r $backup_user@$backup_server: -n root -q",
|
||||
# Define: bup::site
|
||||
#
|
||||
define bup::site(
|
||||
$backup_user,
|
||||
$backup_server
|
||||
) {
|
||||
cron { "bup-${name}":
|
||||
user => 'root',
|
||||
hour => '5',
|
||||
minute => '37',
|
||||
command => "tar -X /etc/bup-excludes -cPf - / | bup split -r ${backup_user}@${backup_server}: -n root -q",
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user