Left: | ||
Right: |
OLD | NEW |
---|---|
1 class ssh ($custom_configuration = '') { | 1 class ssh () { |
Wladimir Palant
2014/07/15 11:56:47
Nit: parentheses are unnecessary if there are no p
mathias
2014/07/15 12:03:12
Ok.
| |
2 package {'openssh-server': ensure => present} | 2 package {'openssh-server': ensure => present} |
3 | 3 |
4 file {'/etc/ssh/sshd_config': | 4 concat {'sshd_config': |
5 ensure => present, | 5 path => '/etc/ssh/sshd_config', |
6 owner => root, | 6 owner => root, |
7 group => root, | 7 group => root, |
8 mode => 0644, | 8 mode => 0644, |
9 content => template('ssh/sshd_config.erb'), | |
10 require => Package['openssh-server'] | 9 require => Package['openssh-server'] |
11 } | 10 } |
12 | 11 |
12 concat::fragment {'sshd_config_template': | |
13 target => 'sshd_config', | |
14 content => template('ssh/sshd_config.erb'), | |
15 order => '01', | |
16 } | |
17 | |
13 service {'ssh': | 18 service {'ssh': |
14 ensure => running, | 19 ensure => running, |
15 enable => true, | 20 enable => true, |
16 hasstatus => true, | 21 hasstatus => true, |
17 hasrestart => true, | 22 hasrestart => true, |
18 subscribe => File['/etc/ssh/sshd_config'] | 23 subscribe => Concat['sshd_config'] |
19 } | 24 } |
20 } | 25 } |
OLD | NEW |