diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-08-26 22:48:57 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-08-26 22:48:57 -0300 |
commit | 6734c256525e1dd42ba3648db82083bcabca66ed (patch) | |
tree | 45203baef02d74b81e2d66983d3b3d029d1beec9 | |
parent | 618cddaaeb0a89d3f01f359ebcb80be9d95264da (diff) | |
download | puppet-backupninja-6734c256525e1dd42ba3648db82083bcabca66ed.tar.gz puppet-backupninja-6734c256525e1dd42ba3648db82083bcabca66ed.tar.bz2 |
Avoiding duplicate file definitions at backupninja::client::key
-rw-r--r-- | manifests/client.pp | 18 |
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}"], + } } } } |