diff options
Diffstat (limited to 'puppet/modules/site_sshd')
4 files changed, 17 insertions, 3 deletions
diff --git a/puppet/modules/site_sshd/manifests/authorized_keys.pp b/puppet/modules/site_sshd/manifests/authorized_keys.pp new file mode 100644 index 00000000..edd6e3c4 --- /dev/null +++ b/puppet/modules/site_sshd/manifests/authorized_keys.pp @@ -0,0 +1,6 @@ +class site_sshd::authorized_keys { + tag 'leap_authorized_keys' + + create_resources(site_sshd::authorized_keys::key, $site_sshd::ssh_authorized_keys) + +} diff --git a/puppet/modules/site_sshd/manifests/authorized_keys/key.pp b/puppet/modules/site_sshd/manifests/authorized_keys/key.pp new file mode 100644 index 00000000..56271cdc --- /dev/null +++ b/puppet/modules/site_sshd/manifests/authorized_keys/key.pp @@ -0,0 +1,8 @@ +define site_sshd::authorized_keys::key ($key, $type) { + ssh_authorized_key { + $name: + type => $type, + user => 'root', + key => $key + } +} diff --git a/puppet/modules/site_sshd/manifests/init.pp b/puppet/modules/site_sshd/manifests/init.pp index c1c4d3b3..714c0c5a 100644 --- a/puppet/modules/site_sshd/manifests/init.pp +++ b/puppet/modules/site_sshd/manifests/init.pp @@ -1,5 +1,8 @@ class site_sshd { $ssh = hiera_hash('ssh') + $ssh_authorized_keys = $ssh['authorized_keys'] + + include site_sshd::authorized_keys ## ## XTERM TITLE diff --git a/puppet/modules/site_sshd/manifests/ssh_key.pp b/puppet/modules/site_sshd/manifests/ssh_key.pp deleted file mode 100644 index b47b2ebd..00000000 --- a/puppet/modules/site_sshd/manifests/ssh_key.pp +++ /dev/null @@ -1,3 +0,0 @@ -define site_sshd::ssh_key($key) { - # ... todo: deploy ssh_key -} |