OLD | NEW |
1 class ssh( | 1 class ssh( |
2 $agent_forwarding = hiera('ssh::agent_forwarding', false), | 2 $agent_forwarding = hiera('ssh::agent_forwarding', false), |
3 $tcp_forwarding = hiera('ssh::tcp_forwarding', false), | 3 $tcp_forwarding = hiera('ssh::tcp_forwarding', false), |
4 ) { | 4 ) { |
5 | 5 |
6 ensure_packages([ | 6 ensure_packages([ |
7 'openssh-client', | 7 'openssh-client', |
8 'openssh-server', | 8 'openssh-server', |
9 ]) | 9 ]) |
10 | 10 |
11 package {['libssl1.0.0', 'openssl']: | 11 package {['libssl1.0.0', 'openssl']: |
12 ensure => 'latest', | 12 ensure => 'latest', |
13 } | 13 } |
14 | 14 |
15 concat {'sshd_config': | 15 concat {'sshd_config': |
16 path => '/etc/ssh/sshd_config', | 16 path => '/etc/ssh/sshd_config', |
17 owner => root, | 17 owner => root, |
18 group => root, | 18 group => root, |
19 mode => 0644, | 19 mode => '0644', |
20 require => Package['openssh-server'] | 20 require => Package['openssh-server'] |
21 } | 21 } |
22 | 22 |
23 concat::fragment {'sshd_config_template': | 23 concat::fragment {'sshd_config_template': |
24 target => 'sshd_config', | 24 target => 'sshd_config', |
25 content => template('ssh/sshd_config.erb'), | 25 content => template('ssh/sshd_config.erb'), |
26 order => '01', | 26 order => '01', |
27 } | 27 } |
28 | 28 |
29 file {'ssh_config': | 29 file {'ssh_config': |
30 content => template('ssh/ssh_config.erb'), | 30 content => template('ssh/ssh_config.erb'), |
31 group => 'root', | 31 group => 'root', |
32 mode => 0644, | 32 mode => '0644', |
33 owner => 'root', | 33 owner => 'root', |
34 path => '/etc/ssh/ssh_config', | 34 path => '/etc/ssh/ssh_config', |
35 require => Package['openssh-client'], | 35 require => Package['openssh-client'], |
36 } | 36 } |
37 | 37 |
38 service {'ssh': | 38 service {'ssh': |
39 ensure => running, | 39 ensure => running, |
40 enable => true, | 40 enable => true, |
41 hasstatus => true, | 41 hasstatus => true, |
42 hasrestart => true, | 42 hasrestart => true, |
43 subscribe => Concat['sshd_config'] | 43 subscribe => Concat['sshd_config'] |
44 } | 44 } |
45 | 45 |
46 Service['ssh'] <~ Package['libssl1.0.0', 'openssl'] | 46 Service['ssh'] <~ Package['libssl1.0.0', 'openssl'] |
47 } | 47 } |
OLD | NEW |