aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-16 21:20:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-16 21:20:11 -0300
commit3dc5d84016ab7333993e0201073fdfb121b16e39 (patch)
treeb0c644d15c3ae654bf16a9cf88996dbc9767a6c5
parentdd70e104ebf37e9cf0ad5097d81075536001374c (diff)
downloadpuppet-nodo-3dc5d84016ab7333993e0201073fdfb121b16e39.tar.gz
puppet-nodo-3dc5d84016ab7333993e0201073fdfb121b16e39.tar.bz2
Ensurable for ssh_folder
-rw-r--r--manifests/defines/ssh_folder.pp3
-rw-r--r--manifests/defines/ssh_local_key.pp7
2 files changed, 6 insertions, 4 deletions
diff --git a/manifests/defines/ssh_folder.pp b/manifests/defines/ssh_folder.pp
index e61ec02..b2bc55e 100644
--- a/manifests/defines/ssh_folder.pp
+++ b/manifests/defines/ssh_folder.pp
@@ -3,10 +3,11 @@ define ssh_folder(
$home,
$owner,
$group,
+ $ensure => 'directory',
) {
if !defined(File["${home}/.ssh"]) {
file { "${home}/.ssh":
- ensure => directory,
+ ensure => $ensure,
owner => $owner,
group => $group,
mode => 0700,
diff --git a/manifests/defines/ssh_local_key.pp b/manifests/defines/ssh_local_key.pp
index f2828a2..55079f2 100644
--- a/manifests/defines/ssh_local_key.pp
+++ b/manifests/defines/ssh_local_key.pp
@@ -8,9 +8,10 @@ define ssh_local_key(
$ensure = 'present',
) {
ssh_folder { "ssh_local_key-${name}":
- home => $home,
- owner => $owner,
- group => $group,
+ home => $home,
+ owner => $owner,
+ group => $group,
+ ensure => $ensure,
}
file { "${home}/.ssh/${dest}":