aboutsummaryrefslogtreecommitdiff
path: root/manifests/defines
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/defines')
-rw-r--r--manifests/defines/ssh_config.pp7
-rw-r--r--manifests/defines/ssh_create_key.pp6
-rw-r--r--manifests/defines/ssh_known_hosts.pp6
-rw-r--r--manifests/defines/ssh_local_key.pp6
4 files changed, 21 insertions, 4 deletions
diff --git a/manifests/defines/ssh_config.pp b/manifests/defines/ssh_config.pp
index 79d9635..d071822 100644
--- a/manifests/defines/ssh_config.pp
+++ b/manifests/defines/ssh_config.pp
@@ -1,10 +1,15 @@
# Manage ssh config for a particular user
define ssh_config(
$owner,
+ $group,
$home = '/home/$owner',
$ssh_localhost_auth = false
) {
- include nodo::subsystem::ssh_folder
+ class { "nodo::subsystem::ssh_folder":
+ home => $home,
+ owner => $owner,
+ group => $group,
+ }
file { "${home}/.ssh/config":
ensure => present,
diff --git a/manifests/defines/ssh_create_key.pp b/manifests/defines/ssh_create_key.pp
index ec4bb67..3608b7e 100644
--- a/manifests/defines/ssh_create_key.pp
+++ b/manifests/defines/ssh_create_key.pp
@@ -4,7 +4,11 @@ define ssh_create_key(
$keyfile = 'id_rsa',
$home = '/home/$owner'
) {
- include nodo::subsystem::ssh_folder
+ class { "nodo::subsystem::ssh_folder":
+ home => $home,
+ owner => $owner,
+ group => $group,
+ }
exec { "ssh-keygen-${owner}":
command => "ssh-keygen -t rsa -P '' -f ${home}/.ssh/${keyfile}",
diff --git a/manifests/defines/ssh_known_hosts.pp b/manifests/defines/ssh_known_hosts.pp
index 84f25b2..dad17ac 100644
--- a/manifests/defines/ssh_known_hosts.pp
+++ b/manifests/defines/ssh_known_hosts.pp
@@ -4,7 +4,11 @@ define ssh_known_host(
$home = '/home/$owner',
$ssh_localhost_auth = false
) {
- include nodo::subsystem::ssh_folder
+ class { "nodo::subsystem::ssh_folder":
+ home => $home,
+ owner => $owner,
+ group => $group,
+ }
file { "${home}/.ssh/known_hosts":
ensure => present,
diff --git a/manifests/defines/ssh_local_key.pp b/manifests/defines/ssh_local_key.pp
index be6ccd8..99d8361 100644
--- a/manifests/defines/ssh_local_key.pp
+++ b/manifests/defines/ssh_local_key.pp
@@ -7,7 +7,11 @@ define ssh_local_key(
$dest = 'id_rsa',
$ensure = 'present',
) {
- include nodo::subsystem::ssh_folder
+ class { "nodo::subsystem::ssh_folder":
+ home => $home,
+ owner => $owner,
+ group => $group,
+ }
file { "${home}/.ssh/${dest}":
ensure => $ensure,