- # ssh.pp
- # Miah Johnson - <miahNO$P4M@chia-pet.org>
- # Describes how to install SSH, and ensures it is running.
- class ssh {
- case $operatingsystem {
- solaris: { $ossl_lib = ["CSWossl"] }
- opensuse: { $ossl_lib = ["libopenssl0_9_8"] }
- default: { $ossl_lib = ["openssl"] }
- }
- package { $ossl_lib:
- ensure => "installed",
- alias => "openssl",
- }
- case $operatingsystem {
- solaris: { $ssh_srv = ["CSWossh"] }
- suse: { $ssh_srv = ["openssh"] }
- opensuse: { $ssh_srv = ["openssh"] }
- default: { $ssh_srv = ["openssh-server"] }
- }
- package { $ssh_srv:
- ensure => "installed",
- require => Package[openssl],
- }
- file { sshdconfig:
- path => $operatingsystem ? {
- solaris => "/opt/csw/etc/ssh/sshd_config",
- default => "/etc/ssh/sshd_config",
- },
- owner => "root",
- group => "root",
- mode => "600",
- checksum => "md5lite",
- source => "puppet://puppet/nst/sshd_config",
- ensure => "present",
- require => Package["$ssh_srv"],
- }
- service { sshd:
- name => $operatingsystem ? {
- centos => "sshd",
- default => "sshd"
- },
- enable => "true",
- ensure => "running",
- subscribe => file[sshdconfig],
- require => Package["$ssh_srv"],
- }
- }
Undefined
By: miah | Date: Mar 30 2010 19:32 | Format: None | Expires: never | Size: 1.25 KB | Hits: 943
Latest pastes
18 hours ago
1 days ago
1 days ago
1 days ago
2 days ago