mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2025-04-10 16:24:21 +00:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
512130b0d8 | |||
f3cd595a8f | |||
|
03c31b78c2 | ||
|
679c742fd3 | ||
|
9327c68d59 | ||
|
b72f1dfb36 | ||
|
4820ededfa | ||
|
c7e02c53dd | ||
|
43cd819749 | ||
|
ab20bea159 | ||
|
8aba7d0782 | ||
|
a774e8b360 | ||
|
02b61e2180 | ||
|
063df85094 |
@ -329,7 +329,7 @@ Default is:
|
|||||||
monthly => {
|
monthly => {
|
||||||
minute => '0..59',
|
minute => '0..59',
|
||||||
hour => '0..23', # you could also do: ['21..23','0..4','5'],
|
hour => '0..23', # you could also do: ['21..23','0..4','5'],
|
||||||
monthday => '0..28',
|
monthday => '1..28',
|
||||||
month => '*',
|
month => '*',
|
||||||
weekday => '*',
|
weekday => '*',
|
||||||
},
|
},
|
||||||
|
@ -103,6 +103,7 @@ class rsnapshot::config (
|
|||||||
if ! ( $interval and $retain ) {
|
if ! ( $interval and $retain ) {
|
||||||
$interval = pick($hash['interval'], $rsnapshot::params::config_interval)
|
$interval = pick($hash['interval'], $rsnapshot::params::config_interval)
|
||||||
}
|
}
|
||||||
|
|
||||||
# rsnapshot wants numeric values
|
# rsnapshot wants numeric values
|
||||||
if $link_dest {
|
if $link_dest {
|
||||||
$link_dest_num = bool2num($link_dest)
|
$link_dest_num = bool2num($link_dest)
|
||||||
@ -113,6 +114,9 @@ class rsnapshot::config (
|
|||||||
if $use_lazy_deletes {
|
if $use_lazy_deletes {
|
||||||
$use_lazy_deletes_num = bool2num($use_lazy_deletes)
|
$use_lazy_deletes_num = bool2num($use_lazy_deletes)
|
||||||
}
|
}
|
||||||
|
if $one_fs {
|
||||||
|
$one_fs_num = bool2num($one_fs)
|
||||||
|
}
|
||||||
|
|
||||||
$real_include = $rsnapshot::include + $include
|
$real_include = $rsnapshot::include + $include
|
||||||
unless empty($real_include) {
|
unless empty($real_include) {
|
||||||
|
@ -13,7 +13,11 @@ class rsnapshot::install {
|
|||||||
# ensure run directory exists (systemd clears /var/run, so rsnapshot can't create PID files after reboot - issue#12)
|
# 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')
|
$lockpath = pick($rsnapshot::lockpath, $rsnapshot::params::config_lockpath, '/var/run/rsnapshot')
|
||||||
$tmpfiles_d = '/etc/tmpfiles.d'
|
$tmpfiles_d = '/etc/tmpfiles.d'
|
||||||
|
|
||||||
|
file { "${tmpfiles_d}":
|
||||||
|
ensure => directory,
|
||||||
|
}
|
||||||
|
|
||||||
file { "${tmpfiles_d}/rsnapshot.conf":
|
file { "${tmpfiles_d}/rsnapshot.conf":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => "D ${lockpath} 0755 root root -",
|
content => "D ${lockpath} 0755 root root -",
|
||||||
|
@ -96,7 +96,7 @@ class rsnapshot::params {
|
|||||||
monthly => {
|
monthly => {
|
||||||
minute => '0..59',
|
minute => '0..59',
|
||||||
hour => '0..23', # you could also do: ['21..23','0..4','5'],
|
hour => '0..23', # you could also do: ['21..23','0..4','5'],
|
||||||
monthday => '0..28',
|
monthday => '1..28',
|
||||||
month => '*',
|
month => '*',
|
||||||
weekday => '*',
|
weekday => '*',
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "loomsen-rsnapshot",
|
"name": "loomsen-rsnapshot",
|
||||||
"version": "1.2.2",
|
"version": "1.2.5",
|
||||||
"author": "loomsen",
|
"author": "loomsen",
|
||||||
"summary": "Configures rsnapshot.",
|
"summary": "Configures rsnapshot.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -28,6 +28,9 @@ describe 'rsnapshot' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
context 'files provisioned' do
|
context 'files provisioned' do
|
||||||
|
describe file('/etc/tmpfiles.d') do
|
||||||
|
it { should be_directory }
|
||||||
|
end
|
||||||
describe file('/etc/tmpfiles.d/rsnapshot.conf') do
|
describe file('/etc/tmpfiles.d/rsnapshot.conf') do
|
||||||
it { is_expected.to exist }
|
it { is_expected.to exist }
|
||||||
its(:content) { is_expected.to match 'D /var/run/rsnapshot 0755 root root -' }
|
its(:content) { is_expected.to match 'D /var/run/rsnapshot 0755 root root -' }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user