diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-16 14:59:21 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-16 14:59:21 -0300 |
commit | 1991dd84c5b0f181a94a2db6915420d87a1bd46a (patch) | |
tree | 0ae0b56b856c173f7b0c5a33f4a88d30e0aeda4c /manifests/defines/ssh_local_key.pp | |
parent | bf7f099210a8e92c253ef2bdced93ad4811c042e (diff) | |
download | puppet-nodo-1991dd84c5b0f181a94a2db6915420d87a1bd46a.tar.gz puppet-nodo-1991dd84c5b0f181a94a2db6915420d87a1bd46a.tar.bz2 |
Adding ssh_local_key define
Diffstat (limited to 'manifests/defines/ssh_local_key.pp')
-rw-r--r-- | manifests/defines/ssh_local_key.pp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/manifests/defines/ssh_local_key.pp b/manifests/defines/ssh_local_key.pp new file mode 100644 index 0000000..db02b0b --- /dev/null +++ b/manifests/defines/ssh_local_key.pp @@ -0,0 +1,20 @@ +# Manage local ssh keys +define ssh_local_key( + $owner = $name, + $group = $name, + $home = '/home/$owner', + $source = "puppet:///modules/site_keys/${name}_id_rsa", + $dest = 'id-rsa', + $ensure = 'present', +) { + include nodo::subsystem::ssh_folder + + file { "${home}/.ssh/${dest}": + ensure => $ensure, + owner => $owner, + group => $group, + mode => 0400, + source => "$source", + require => File["${home}/.ssh"], + } +} |