aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-21 17:52:01 +0000
committermh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-21 17:52:01 +0000
commit7db46771e777c7f9d4b8b83d2cdc42407ff00e90 (patch)
treebece4d4b11a9c5228b4283fb51a9968b9affe2d0 /manifests
downloadpuppet-sshd-7db46771e777c7f9d4b8b83d2cdc42407ff00e90.tar.gz
puppet-sshd-7db46771e777c7f9d4b8b83d2cdc42407ff00e90.tar.bz2
factored out ssh and sshd in seperate modules, as well added first stuff for euskal
git-svn-id: https://svn/ipuppet/trunk/modules/sshd@289 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp45
1 files changed, 45 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..5015f60
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,45 @@
+# modules/ssh/manifests/init.pp - manage ssh stuff
+# Copyright (C) 2007 admin@immerda.ch
+#
+
+modules_dir { "sshd": }
+
+class sshd {
+ service{'sshd':
+ enable => true,
+ ensure => running,
+ require => Package[openssh],
+ subscribe => File[sshd_config]
+ }
+
+ package{ssh:
+ name => $operatingsystem ? {
+ centos => openssh-server,
+ default => openssh,
+ },
+ alias => 'openssh',
+ category => $operatingsystem ? {
+ gentoo => 'net-misc',
+ default => '',
+ },
+ ensure => present,
+ }
+}
+
+define sshd::sshd_config (
+ $source = ""
+){
+ $real_source = $source ? {
+ '' => "${operatingsystem}_normal",
+ default => $source,
+ }
+
+ file { 'sshd_config':
+ path => '/etc/ssh/sshd_config',
+ owner => root,
+ group => 0,
+ mode => 600,
+ source => $real_source,
+ notify => service[sshd],
+ }
+}