aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-08-26 22:48:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2009-08-26 22:48:57 -0300
commit6734c256525e1dd42ba3648db82083bcabca66ed (patch)
tree45203baef02d74b81e2d66983d3b3d029d1beec9
parent618cddaaeb0a89d3f01f359ebcb80be9d95264da (diff)
downloadpuppet-backupninja-6734c256525e1dd42ba3648db82083bcabca66ed.tar.gz
puppet-backupninja-6734c256525e1dd42ba3648db82083bcabca66ed.tar.bz2
Avoiding duplicate file definitions at backupninja::client::key
-rw-r--r--manifests/client.pp18
1 files changed, 11 insertions, 7 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index a3d2242..8368eb4 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -72,14 +72,18 @@ class backupninja::client {
case $install_key {
true: {
- file { "${backupninja::client::real_keydestination}":
- ensure => directory,
- mode => 0700, owner => $key_owner, group => $key_group,
+ if !defined(File["${backupninja::client::real_keydestination}"]) {
+ file { "${backupninja::client::real_keydestination}":
+ ensure => directory,
+ mode => 0700, owner => $key_owner, group => $key_group,
+ }
}
- file { "${backupninja::client::real_keydestination}/id_${key_type}":
- source => "${key_store}/${real_user}_id_${key_type}",
- mode => 0400, owner => $key_owner, group => $key_group,
- require => File["${backupninja::client::real_keydestination}"],
+ if !defined(File["${backupninja::client::real_keydestination/id_${key_type}"]) {
+ file { "${backupninja::client::real_keydestination}/id_${key_type}":
+ source => "${key_store}/${real_user}_id_${key_type}",
+ mode => 0400, owner => $key_owner, group => $key_group,
+ require => File["${backupninja::client::real_keydestination}"],
+ }
}
}
}