aboutsummaryrefslogtreecommitdiff
path: root/manifests/defines
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/defines')
-rw-r--r--manifests/defines/ssh_config.pp2
-rw-r--r--manifests/defines/ssh_create_key.pp2
-rw-r--r--manifests/defines/ssh_folder.pp15
-rw-r--r--manifests/defines/ssh_known_hosts.pp2
-rw-r--r--manifests/defines/ssh_local_key.pp2
5 files changed, 19 insertions, 4 deletions
diff --git a/manifests/defines/ssh_config.pp b/manifests/defines/ssh_config.pp
index d071822..5585520 100644
--- a/manifests/defines/ssh_config.pp
+++ b/manifests/defines/ssh_config.pp
@@ -5,7 +5,7 @@ define ssh_config(
$home = '/home/$owner',
$ssh_localhost_auth = false
) {
- class { "nodo::subsystem::ssh_folder":
+ ssh_folder { "ssh-config-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/ssh_create_key.pp b/manifests/defines/ssh_create_key.pp
index 3608b7e..77d1f00 100644
--- a/manifests/defines/ssh_create_key.pp
+++ b/manifests/defines/ssh_create_key.pp
@@ -4,7 +4,7 @@ define ssh_create_key(
$keyfile = 'id_rsa',
$home = '/home/$owner'
) {
- class { "nodo::subsystem::ssh_folder":
+ ssh_folder { "ssh_create_key-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/ssh_folder.pp b/manifests/defines/ssh_folder.pp
new file mode 100644
index 0000000..e61ec02
--- /dev/null
+++ b/manifests/defines/ssh_folder.pp
@@ -0,0 +1,15 @@
+# Manage a ssh folder
+define ssh_folder(
+ $home,
+ $owner,
+ $group,
+) {
+ if !defined(File["${home}/.ssh"]) {
+ file { "${home}/.ssh":
+ ensure => directory,
+ owner => $owner,
+ group => $group,
+ mode => 0700,
+ }
+ }
+}
diff --git a/manifests/defines/ssh_known_hosts.pp b/manifests/defines/ssh_known_hosts.pp
index dad17ac..c0d7157 100644
--- a/manifests/defines/ssh_known_hosts.pp
+++ b/manifests/defines/ssh_known_hosts.pp
@@ -4,7 +4,7 @@ define ssh_known_host(
$home = '/home/$owner',
$ssh_localhost_auth = false
) {
- class { "nodo::subsystem::ssh_folder":
+ ssh_folder { "ssh_known_host-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/ssh_local_key.pp b/manifests/defines/ssh_local_key.pp
index 99d8361..f2828a2 100644
--- a/manifests/defines/ssh_local_key.pp
+++ b/manifests/defines/ssh_local_key.pp
@@ -7,7 +7,7 @@ define ssh_local_key(
$dest = 'id_rsa',
$ensure = 'present',
) {
- class { "nodo::subsystem::ssh_folder":
+ ssh_folder { "ssh_local_key-${name}":
home => $home,
owner => $owner,
group => $group,