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