1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-11-10 00:00:35 +00:00
puppet-rsnapshot/manifests/install.pp

28 lines
695 B
ObjectPascal
Raw Permalink Normal View History

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'
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
}