aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openssh
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-08 22:24:43 +0000
committerMichael Scherer <misc@mageia.org>2012-01-08 22:24:43 +0000
commit86f27423aa7c86c570031aeab3bd173af20194d9 (patch)
tree7e92d8a207d9c61d4a413c2bba885a40a805d7fc /modules/openssh
parent75fac2802ec83ecaefa4140d10a8eaec5f1f6dce (diff)
downloadpuppet-86f27423aa7c86c570031aeab3bd173af20194d9.tar
puppet-86f27423aa7c86c570031aeab3bd173af20194d9.tar.gz
puppet-86f27423aa7c86c570031aeab3bd173af20194d9.tar.bz2
puppet-86f27423aa7c86c570031aeab3bd173af20194d9.tar.xz
puppet-86f27423aa7c86c570031aeab3bd173af20194d9.zip
cleaning of the openssh module
Diffstat (limited to 'modules/openssh')
-rw-r--r--modules/openssh/manifests/init.pp31
1 files changed, 6 insertions, 25 deletions
diff --git a/modules/openssh/manifests/init.pp b/modules/openssh/manifests/init.pp
index 44561ee0..7d1856eb 100644
--- a/modules/openssh/manifests/init.pp
+++ b/modules/openssh/manifests/init.pp
@@ -3,9 +3,7 @@ class openssh {
# some trick to manage sftp server, who is arch dependent on mdv
$path_to_sftp = "$lib_dir/ssh/"
- package { "openssh-server":
- ensure => installed
- }
+ package { "openssh-server": }
service { sshd:
ensure => running,
@@ -15,10 +13,6 @@ class openssh {
file { "/etc/ssh/sshd_config":
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
require => Package["openssh-server"],
content => template("openssh/sshd_config"),
notify => Service["sshd"]
@@ -34,23 +28,15 @@ class openssh {
content => template("openssh/sshd_config","openssh/sshd_config_ldap")
}
- package { 'python-ldap':
- ensure => installed,
- }
+ package { 'python-ldap': }
$pubkeys_directory = "/var/lib/pubkeys"
file { $pubkeys_directory:
ensure => directory,
- owner => root,
- group => root,
- mode => 755,
- # before => Class["openssh"]
}
file { "$pubkeys_directory/root":
ensure => directory,
- owner => root,
- group => root,
mode => 700,
}
@@ -76,24 +62,19 @@ class openssh {
symlink_user { $symlink_users: }
-
- $sshkey2file = "/usr/local/bin/ldap-sshkey2file.py"
$ldap_pwfile = "/etc/ldap.secret"
- file { $sshkey2file:
- ensure => present,
- owner => root,
- group => root,
- mode => 755,
+ local_script { "ldap-sshkey2file.py"
content => template("openssh/ldap-sshkey2file.py"),
require => Package['python-ldap']
}
+
cron { 'sshkey2file':
- command => $sshkey2file,
+ command => "/usr/local/bin/ldap-sshkey2file.py"
hour => "*",
minute => "*/10",
user => root,
environment => "MAILTO=root",
- require => File[$sshkey2file],
+ require => Local_script['ldap-sshkey2file.py'],
}
}
}