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 {
|
class bup {
|
||||||
package { "bup":
|
package { 'bup':
|
||||||
ensure => present
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/etc/bup-excludes":
|
|
||||||
ensure => present,
|
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) {
|
# Define: bup::site
|
||||||
cron { "bup-$name":
|
#
|
||||||
user => root,
|
define bup::site(
|
||||||
hour => "5",
|
$backup_user,
|
||||||
minute => "37",
|
$backup_server
|
||||||
command => "tar -X /etc/bup-excludes -cPf - / | bup split -r $backup_user@$backup_server: -n root -q",
|
) {
|
||||||
|
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