Fixing puppet-lint errors.
This commit is contained in:
parent
2f83cb7d4a
commit
34c36045fa
59 changed files with 995 additions and 990 deletions
|
@ -17,17 +17,17 @@
|
|||
define backuppc::manualclient($ensure = "present", $operatingsystem = "default") {
|
||||
|
||||
@@file { "/etc/BackupPC/pc/${name}.pl":
|
||||
ensure => "${ensure}",
|
||||
source => [ "puppet:///files/backuppc/${name}.pl",
|
||||
"puppet:///files/backuppc/${operatingsystem}.pl",
|
||||
"puppet:///files/backuppc/default.pl",
|
||||
"puppet:///modules/backuppc/default.pl", ],
|
||||
mode => 0640,
|
||||
owner => root,
|
||||
group => backuppc,
|
||||
tag => "backuppc",
|
||||
require => File["/etc/BackupPC/pc"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
ensure => $ensure,
|
||||
source => [ "puppet:///files/backuppc/${name}.pl",
|
||||
"puppet:///files/backuppc/${operatingsystem}.pl",
|
||||
"puppet:///files/backuppc/default.pl",
|
||||
"puppet:///modules/backuppc/default.pl", ],
|
||||
mode => 0640,
|
||||
owner => root,
|
||||
group => backuppc,
|
||||
tag => "backuppc",
|
||||
require => File["/etc/BackupPC/pc"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -36,9 +36,9 @@ define backuppc::manualclient($ensure = "present", $operatingsystem = "default")
|
|||
#
|
||||
class backuppc::client {
|
||||
|
||||
backuppc::manualclient { "${homename}":
|
||||
ensure => present,
|
||||
operatingsystem => "${operatingsystem}",
|
||||
backuppc::manualclient { $homename:
|
||||
ensure => present,
|
||||
operatingsystem => $operatingsystem,
|
||||
}
|
||||
|
||||
include rsync
|
||||
|
@ -57,13 +57,13 @@ class backuppc::server {
|
|||
realize(User["backuppc"], Group["backuppc"])
|
||||
|
||||
package { "BackupPC":
|
||||
ensure => installed,
|
||||
ensure => installed,
|
||||
require => [ User["backuppc"],
|
||||
Group["backuppc"], ],
|
||||
}
|
||||
|
||||
if $backuppc_datadir {
|
||||
file { "${backuppc_datadir}":
|
||||
file { $backuppc_datadir:
|
||||
ensure => directory,
|
||||
mode => 0750,
|
||||
owner => "backuppc",
|
||||
|
@ -72,10 +72,10 @@ class backuppc::server {
|
|||
}
|
||||
|
||||
file { "/var/lib/BackupPC":
|
||||
ensure => "${backuppc_datadir}",
|
||||
ensure => $backuppc_datadir,
|
||||
force => true,
|
||||
backup => ".orig",
|
||||
require => File["${backuppc_datadir}"],
|
||||
require => File[$backuppc_datadir],
|
||||
before => File["/var/lib/BackupPC/.ssh"],
|
||||
}
|
||||
}
|
||||
|
@ -128,11 +128,11 @@ class backuppc::server {
|
|||
}
|
||||
|
||||
file { "/etc/BackupPC/config.pl":
|
||||
ensure => present,
|
||||
source => "puppet:///files/backuppc/config.pl",
|
||||
mode => 0440,
|
||||
owner => "backuppc",
|
||||
group => "backuppc",
|
||||
ensure => present,
|
||||
source => "puppet:///files/backuppc/config.pl",
|
||||
mode => 0440,
|
||||
owner => "backuppc",
|
||||
group => "backuppc",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
|
@ -140,17 +140,17 @@ class backuppc::server {
|
|||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
require => Package["BackupPC"],
|
||||
notify => Service["backuppc"],
|
||||
require => Package["BackupPC"],
|
||||
notify => Service["backuppc"],
|
||||
}
|
||||
|
||||
file { "/etc/BackupPC/hosts.in":
|
||||
ensure => present,
|
||||
source => [ "puppet:///files/backuppc/hosts.in",
|
||||
"puppet:///modules/backuppc/hosts.in", ],
|
||||
mode => 0644,
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
ensure => present,
|
||||
source => [ "puppet:///files/backuppc/hosts.in",
|
||||
"puppet:///modules/backuppc/hosts.in", ],
|
||||
mode => 0644,
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
|
@ -158,18 +158,18 @@ class backuppc::server {
|
|||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
}
|
||||
|
||||
file { "/etc/BackupPC/pc":
|
||||
ensure => directory,
|
||||
purge => true,
|
||||
force => true,
|
||||
recurse => true,
|
||||
mode => 0640,
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
ensure => directory,
|
||||
purge => true,
|
||||
force => true,
|
||||
recurse => true,
|
||||
mode => 0640,
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
|
@ -177,17 +177,17 @@ class backuppc::server {
|
|||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
source => "puppet:///modules/custom/empty",
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
source => "puppet:///modules/custom/empty",
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
}
|
||||
|
||||
exec { "generate-backuppc-hosts":
|
||||
command => "/bin/sh -c '(cat /etc/BackupPC/hosts.in ; find /etc/BackupPC/pc -name \\*.pl -exec basename {} .pl \\; | sed -e \"s/\$/ 0 adm/\") > /etc/BackupPC/hosts'",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
require => File["/etc/BackupPC/hosts.in"],
|
||||
notify => Service["backuppc"],
|
||||
command => "/bin/sh -c '(cat /etc/BackupPC/hosts.in ; find /etc/BackupPC/pc -name \\*.pl -exec basename {} .pl \\; | sed -e \"s/\$/ 0 adm/\") > /etc/BackupPC/hosts'",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
require => File["/etc/BackupPC/hosts.in"],
|
||||
notify => Service["backuppc"],
|
||||
}
|
||||
|
||||
File <<| tag == "backuppc" |>> {
|
||||
|
@ -201,9 +201,9 @@ class backuppc::server {
|
|||
}
|
||||
|
||||
service { "backuppc":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["BackupPC"],
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["BackupPC"],
|
||||
}
|
||||
|
||||
file { "/var/lib/BackupPC/.ssh":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue