OLD | NEW |
1 class ssh ($custom_configuration = '') { | 1 class ssh ( |
| 2 $max_startups = "10:30:60", |
| 3 $max_sessions = "10" ) { |
| 4 |
2 package {'openssh-server': ensure => present} | 5 package {'openssh-server': ensure => present} |
3 | 6 |
4 file {'/etc/ssh/sshd_config': | 7 concat {'sshd_config': |
5 ensure => present, | 8 path => '/etc/ssh/sshd_config', |
6 owner => root, | 9 owner => root, |
7 group => root, | 10 group => root, |
8 mode => 0644, | 11 mode => 0644, |
9 content => template('ssh/sshd_config.erb'), | |
10 require => Package['openssh-server'] | 12 require => Package['openssh-server'] |
11 } | 13 } |
12 | 14 |
| 15 concat::fragment {'sshd_config_template': |
| 16 target => 'sshd_config', |
| 17 content => template('ssh/sshd_config.erb'), |
| 18 order => '01', |
| 19 } |
| 20 |
13 service {'ssh': | 21 service {'ssh': |
14 ensure => running, | 22 ensure => running, |
15 enable => true, | 23 enable => true, |
16 hasstatus => true, | 24 hasstatus => true, |
17 hasrestart => true, | 25 hasrestart => true, |
18 subscribe => File['/etc/ssh/sshd_config'] | 26 subscribe => Concat['sshd_config'] |
19 } | 27 } |
20 } | 28 } |
OLD | NEW |