mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2025-09-13 07:49:29 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
512130b0d8
|
|||
f3cd595a8f
|
@@ -5,16 +5,17 @@ cache: bundler
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- rvm: 2.3
|
||||
- rvm: 2.1
|
||||
env: PUPPET_GEM_VERSION="~> 4.0"
|
||||
script: "bundle exec rake validate"
|
||||
- rvm: 2.3
|
||||
- rvm: 2.1
|
||||
env: PUPPET_GEM_VERSION="~> 4.0"
|
||||
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
|
||||
- rvm: 2.3
|
||||
- rvm: 2.1
|
||||
env: PUPPET_GEM_VERSION="~> 4.0"
|
||||
script: "bundle exec rake beaker"
|
||||
services: docker
|
||||
sudo: required
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
|
@@ -103,6 +103,7 @@ class rsnapshot::config (
|
||||
if ! ( $interval and $retain ) {
|
||||
$interval = pick($hash['interval'], $rsnapshot::params::config_interval)
|
||||
}
|
||||
|
||||
# rsnapshot wants numeric values
|
||||
if $link_dest {
|
||||
$link_dest_num = bool2num($link_dest)
|
||||
@@ -113,6 +114,9 @@ class rsnapshot::config (
|
||||
if $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
|
||||
unless empty($real_include) {
|
||||
@@ -190,8 +194,6 @@ class rsnapshot::config (
|
||||
# create cron files for each backup level
|
||||
# merge possible cron definitions to one
|
||||
$real_cron = deep_merge($rsnapshot::params::cron, $rsnapshot::cron, $hash[cron])
|
||||
$cmd_rsnapshot = pick($rsnapshot::cmd_rsnapshot, $rsnapshot::params::config_cmd_rsnapshot)
|
||||
|
||||
concat::fragment { "mailto for ${host}":
|
||||
content => "#This file is managed by puppet\nMAILTO=${real_cron[mailto]}\n\n",
|
||||
target => $cronfile,
|
||||
|
@@ -3,17 +3,13 @@
|
||||
# default params
|
||||
class rsnapshot::params {
|
||||
$hosts = undef
|
||||
$conf_d = $::osfamily ? {
|
||||
'FreeBSD' => '/usr/local/etc/rsnapshot', # the place where the host specific configs are stored
|
||||
default => '/etc/rsnapshot,' # the place where the host specific configs are stored
|
||||
}
|
||||
$conf_d = '/etc/rsnapshot' # the place where the host specific configs are stored
|
||||
$config_backup_user = 'root'
|
||||
$package_name = 'rsnapshot'
|
||||
$package_ensure = 'present'
|
||||
$cron_service_name = $::osfamily ? {
|
||||
'RedHat' => 'crond',
|
||||
'Debian' => 'cron',
|
||||
'FreeBSD' => 'cron',
|
||||
default => '',
|
||||
}
|
||||
$manage_cron = true
|
||||
@@ -24,21 +20,11 @@ class rsnapshot::params {
|
||||
$config_check_mk_job = false
|
||||
$config_cmd_cp = '/bin/cp'
|
||||
$config_cmd_rm = '/bin/rm'
|
||||
$config_cmd_rsync = $::osfamily ? {
|
||||
'FreeBSD' => '/usr/local/bin/rsync',
|
||||
default => '/usr/bin/rsync',
|
||||
}
|
||||
$config_cmd_rsync = '/usr/bin/rsync'
|
||||
$config_cmd_ssh = '/usr/bin/ssh'
|
||||
$config_cmd_logger = '/usr/bin/logger'
|
||||
$config_cmd_du = '/usr/bin/du'
|
||||
$config_cmd_rsnapshot = $::osfamily ? {
|
||||
'FreeBSD' => '/usr/local/bin/rsnapshot',
|
||||
default => '/usr/bin/rsnapshot',
|
||||
}
|
||||
$config_cmd_rsnapshot_diff = $::osfamily ? {
|
||||
'FreeBSD' => '/usr/local/bin/rsnapshot-diff',
|
||||
default => '/usr/bin/rsnapshot-diff',
|
||||
}
|
||||
$config_cmd_rsnapshot_diff = '/usr/bin/rsnapshot-diff'
|
||||
$config_cmd_preexec = undef
|
||||
$config_cmd_postexec = undef
|
||||
$config_cronfile_prefix = 'rsnapshot_'
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "loomsen-rsnapshot",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"author": "loomsen",
|
||||
"summary": "Configures rsnapshot.",
|
||||
"license": "Apache-2.0",
|
||||
@@ -15,7 +15,7 @@
|
||||
"dependencies": [
|
||||
{ "name": "puppetlabs-stdlib","version_requirement": ">= 1.0.0" },
|
||||
{ "name": "stahnma-epel","version_requirement": ">= 1.0.0" },
|
||||
{ "name": "puppetlabs-concat","version_requirement": ">= 2.0.0" }
|
||||
{ "name": "puppetlabs-concat","version_requirement": ">= 2.0.0 < 3.0.0" }
|
||||
],
|
||||
"operatingsystem_support": [
|
||||
{
|
||||
|
@@ -1 +1 @@
|
||||
<%= @minute %> <%= @hour %> <%= @monthday %> <%= @month %> <%= @weekday %> root<% if scope['rsnapshot::check_mk_job'] == true -%> mk-job rsnapshot_<%= @host %>_<%= @level %><% end -%> <%= @cmd_rsnapshot %> -c <%= @config %> <%= @level %>
|
||||
<%= @minute %> <%= @hour %> <%= @monthday %> <%= @month %> <%= @weekday %> root<% if scope['rsnapshot::check_mk_job'] == true -%> mk-job rsnapshot_<%= @host %>_<%= @level %><% end -%> /usr/bin/rsnapshot -c <%= @config %> <%= @level %>
|
||||
|
Reference in New Issue
Block a user