...
 
Commits (3)
...@@ -12,6 +12,6 @@ define backupninja::cron( ...@@ -12,6 +12,6 @@ define backupninja::cron(
content => template('backupninja/backupninja.cron.erb'), content => template('backupninja/backupninja.cron.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0644 mode => '0644'
} }
} }
...@@ -135,7 +135,7 @@ define backupninja::duplicity( $order = 90, ...@@ -135,7 +135,7 @@ define backupninja::duplicity( $order = 90,
content => template('backupninja/dup.conf.erb'), content => template('backupninja/dup.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
......
...@@ -28,7 +28,7 @@ define backupninja::labelmount($order = 10, ...@@ -28,7 +28,7 @@ define backupninja::labelmount($order = 10,
content => template('backupninja/labelmount.conf.erb'), content => template('backupninja/labelmount.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
...@@ -37,7 +37,7 @@ define backupninja::labelmount($order = 10, ...@@ -37,7 +37,7 @@ define backupninja::labelmount($order = 10,
content => template('backupninja/umount.conf.erb'), content => template('backupninja/umount.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
...@@ -48,7 +48,7 @@ define backupninja::labelmount($order = 10, ...@@ -48,7 +48,7 @@ define backupninja::labelmount($order = 10,
content => template('backupninja/labelmount.handler'), content => template('backupninja/labelmount.handler'),
owner => root, owner => root,
group => root, group => root,
mode => 0755, mode => '0755',
require => Package[backupninja] require => Package[backupninja]
} }
...@@ -56,7 +56,7 @@ define backupninja::labelmount($order = 10, ...@@ -56,7 +56,7 @@ define backupninja::labelmount($order = 10,
content => template('backupninja/umount.handler'), content => template('backupninja/umount.handler'),
owner => root, owner => root,
group => root, group => root,
mode => 0755, mode => '0755',
require => Package[backupninja] require => Package[backupninja]
} }
} }
...@@ -37,7 +37,7 @@ define backupninja::maildir( ...@@ -37,7 +37,7 @@ define backupninja::maildir(
content => template('backupninja/maildir.conf.erb'), content => template('backupninja/maildir.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
} }
...@@ -32,7 +32,7 @@ define backupninja::mysql( ...@@ -32,7 +32,7 @@ define backupninja::mysql(
content => template('backupninja/mysql.conf.erb'), content => template('backupninja/mysql.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
} }
...@@ -21,7 +21,7 @@ define backupninja::pgsql( ...@@ -21,7 +21,7 @@ define backupninja::pgsql(
content => template('backupninja/pgsql.conf.erb'), content => template('backupninja/pgsql.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
} }
...@@ -43,7 +43,7 @@ define backupninja::rdiff( $order = 90, ...@@ -43,7 +43,7 @@ define backupninja::rdiff( $order = 90,
$host = false, $host = false,
$user = false, $user = false,
$home = "/home/${user}-${name}", $home = "/home/${user}-${name}",
$keep = 30, $keep = "30",
$sshoptions = false, $sshoptions = false,
# ssh keypair config # ssh keypair config
$key = false, $key = false,
...@@ -97,7 +97,7 @@ define backupninja::rdiff( $order = 90, ...@@ -97,7 +97,7 @@ define backupninja::rdiff( $order = 90,
content => template('backupninja/rdiff.conf.erb'), content => template('backupninja/rdiff.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
......
...@@ -117,7 +117,7 @@ define backupninja::rsync( $order = 90, ...@@ -117,7 +117,7 @@ define backupninja::rsync( $order = 90,
content => template('backupninja/rsync.conf.erb'), content => template('backupninja/rsync.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
......
...@@ -21,7 +21,7 @@ class backupninja::server ( ...@@ -21,7 +21,7 @@ class backupninja::server (
file { $backupdir: file { $backupdir:
ensure => $backupdir_ensure, ensure => $backupdir_ensure,
mode => 0710, owner => root, group => "backupninjas", mode => '0710', owner => root, group => "backupninjas",
require => $backupdir_ensure ? { require => $backupdir_ensure ? {
'directory' => undef, 'directory' => undef,
default => File["$backupdir_ensure"], default => File["$backupdir_ensure"],
...@@ -37,7 +37,7 @@ class backupninja::server ( ...@@ -37,7 +37,7 @@ class backupninja::server (
file { "/usr/local/bin/checkbackups": file { "/usr/local/bin/checkbackups":
ensure => "present", ensure => "present",
source => "puppet:///modules/backupninja/checkbackups.pl", source => "puppet:///modules/backupninja/checkbackups.pl",
mode => 0755, owner => root, group => root, mode => '0755', owner => root, group => root,
} }
cron { checkbackups: cron { checkbackups:
...@@ -80,7 +80,7 @@ class backupninja::server ( ...@@ -80,7 +80,7 @@ class backupninja::server (
if !defined(File["$dir"]) { if !defined(File["$dir"]) {
@@file { "$dir": @@file { "$dir":
ensure => directory, ensure => directory,
mode => 0750, owner => $user, group => 0, mode => '0750', owner => $user, group => 0,
tag => "$backuptag", tag => "$backuptag",
} }
} }
...@@ -91,7 +91,7 @@ class backupninja::server ( ...@@ -91,7 +91,7 @@ class backupninja::server (
if !defined(File["$ssh_dir"]) { if !defined(File["$ssh_dir"]) {
@@file { "${ssh_dir}": @@file { "${ssh_dir}":
ensure => directory, ensure => directory,
mode => 0700, owner => $user, group => 0, mode => '0700', owner => $user, group => 0,
require => [User[$user], File["$dir"]], require => [User[$user], File["$dir"]],
tag => "$backuptag", tag => "$backuptag",
} }
...@@ -116,7 +116,7 @@ class backupninja::server ( ...@@ -116,7 +116,7 @@ class backupninja::server (
if !defined(File["${ssh_dir}/${authorized_keys_file}"]) { if !defined(File["${ssh_dir}/${authorized_keys_file}"]) {
@@file { "${ssh_dir}/${authorized_keys_file}": @@file { "${ssh_dir}/${authorized_keys_file}":
ensure => present, ensure => present,
mode => 0644, owner => 0, group => 0, mode => '0644', owner => 0, group => 0,
source => "${backupkeys}/${user}_id_${keytype}.pub", source => "${backupkeys}/${user}_id_${keytype}.pub",
require => File["${ssh_dir}"], require => File["${ssh_dir}"],
tag => "$backuptag", tag => "$backuptag",
......
...@@ -19,7 +19,7 @@ define backupninja::sh($order = 50, ...@@ -19,7 +19,7 @@ define backupninja::sh($order = 50,
content => template('backupninja/sh.conf.erb'), content => template('backupninja/sh.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
} }
...@@ -22,7 +22,7 @@ define backupninja::svn($order = 20, ...@@ -22,7 +22,7 @@ define backupninja::svn($order = 20,
content => template('backupninja/svn.conf.erb'), content => template('backupninja/svn.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
} }
...@@ -39,7 +39,7 @@ define backupninja::sys($order = 30, ...@@ -39,7 +39,7 @@ define backupninja::sys($order = 30,
content => template('backupninja/sys.conf.erb'), content => template('backupninja/sys.conf.erb'),
owner => root, owner => root,
group => root, group => root,
mode => 0600, mode => '0600',
require => File["${backupninja::configdir}"] require => File["${backupninja::configdir}"]
} }
} }
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
# service in Puppet. # service in Puppet.
loglevel = <%= @loglvl %> loglevel = <%= @loglvl %>
when = <%= send(:when) %> when = <%= @send %>
reportemail = <%= @reportemail %> reportemail = <%= @reportemail %>
reportsuccess = <%= @reportsuccess ? 'yes' : 'no' %> reportsuccess = <%= @reportsuccess ? 'yes' : 'no' %>
reportwarning = <%= @reportwarning ? 'yes' : 'no' %> reportwarning = <%= @reportwarning ? 'yes' : 'no' %>
<% if reporthost.is_a? String -%> <% if @reporthost.is_a? String -%>
<%= 'reporthost = ' + @reporthost %> <%= 'reporthost = ' + @reporthost %>
<% end -%> <% end -%>
<% if reportuser.is_a? String -%> <% if @reportuser.is_a? String -%>
<%= 'reportuser = ' + @reportuser %> <%= 'reportuser = ' + @reportuser %>
<% end -%> <% end -%>
<% if reportdirectory.is_a? String -%> <% if @reportdirectory.is_a? String -%>
<%= 'reportdirectory = ' + @reportdirectory %> <%= 'reportdirectory = ' + @reportdirectory %>
<% end -%> <% end -%>
logfile = <%= @logfile %> logfile = <%= @logfile %>
......
...@@ -3,30 +3,30 @@ ...@@ -3,30 +3,30 @@
# the next time Puppet runs. Please make configuration changes to this # the next time Puppet runs. Please make configuration changes to this
# service in Puppet. # service in Puppet.
<%= 'options = ' + options if options %> <%= 'options = ' + @options if @options %>
<%= extras if extras %> <%= @extras if @extras %>
[source] [source]
type = local type = local
<%= 'keep = ' + keep if keep %> <%= 'keep = ' + @keep if @keep %>
<% if include.is_a? String -%> <% if @include.is_a? String -%>
<%= 'include = ' + include %> <%= 'include = ' + @include %>
<% elsif include.is_a? Array -%> <% elsif @include.is_a? Array -%>
<%= include.map { |i| "include = #{i}" }.join("\n") %> <%= @include.map { |i| "include = #{i}" }.join("\n") %>
<% end -%> <% end -%>
<% if exclude.is_a? String -%> <% if @exclude.is_a? String -%>
<%= 'exclude = ' + exclude %> <%= 'exclude = ' + @exclude %>
<% elsif exclude.is_a? Array -%> <% elsif @exclude.is_a? Array -%>
<%= exclude.map { |i| "exclude = #{i}" }.join("\n") %> <%= @exclude.map { |i| "exclude = #{i}" }.join("\n") %>
<% end -%> <% end -%>
<% if vsinclude.is_a? String -%> <% if @vsinclude.is_a? String -%>
<%= 'vsinclude = ' + vsinclude %> <%= 'vsinclude = ' + @vsinclude %>
<% elsif vsinclude.is_a? Array -%> <% elsif @vsinclude.is_a? Array -%>
<%= vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %> <%= @vsinclude.map { |i| "vsinclude = #{i}" }.join("\n") %>
<% end -%> <% end -%>
[dest] [dest]
......