2015-12-19 10:16:05 +00:00
|
|
|
# == Class: rsnapshot::install
|
|
|
|
#
|
|
|
|
# Installs the rsnapshot package.
|
2016-01-18 18:54:53 +00:00
|
|
|
class rsnapshot::install {
|
2015-12-21 10:43:50 +00:00
|
|
|
case $::operatingsystem {
|
|
|
|
/^CentOS$/: { include epel }
|
|
|
|
default: {}
|
|
|
|
}
|
2015-12-19 10:16:05 +00:00
|
|
|
package { $rsnapshot::package_name:
|
|
|
|
ensure => $rsnapshot::package_ensure,
|
|
|
|
}
|
|
|
|
|
2017-04-24 17:25:16 +00:00
|
|
|
# ensure run directory exists (systemd clears /var/run, so rsnapshot can't create PID files after reboot - issue#12)
|
|
|
|
$lockpath = pick($rsnapshot::lockpath, $rsnapshot::params::config_lockpath, '/var/run/rsnapshot')
|
|
|
|
$tmpfiles_d = '/etc/tmpfiles.d'
|
2017-04-24 18:43:49 +00:00
|
|
|
|
|
|
|
file { "${tmpfiles_d}":
|
|
|
|
ensure => directory,
|
|
|
|
}
|
|
|
|
|
2017-04-24 17:25:16 +00:00
|
|
|
file { "${tmpfiles_d}/rsnapshot.conf":
|
|
|
|
ensure => present,
|
|
|
|
content => "D ${lockpath} 0755 root root -",
|
|
|
|
}
|
|
|
|
|
2015-12-19 10:16:05 +00:00
|
|
|
}
|
|
|
|
|