OLD | NEW |
| (Empty) |
1 class statsclient { | |
2 | |
3 include ssh | |
4 | |
5 user {'stats': | |
6 ensure => present, | |
7 home => '/home/stats', | |
8 managehome => true, | |
9 groups => ['adm'], | |
10 } | |
11 | |
12 file {'/home/stats/.ssh': | |
13 ensure => directory, | |
14 owner => stats, | |
15 mode => 0600, | |
16 require => User['stats'], | |
17 } | |
18 | |
19 file {'/home/stats/.ssh/authorized_keys': | |
20 ensure => present, | |
21 owner => stats, | |
22 mode => 0400, | |
23 source => 'puppet:///modules/private/stats-authorized_keys', | |
24 } | |
25 | |
26 concat::fragment {'sshd_user_stats': | |
27 target => 'sshd_config', | |
28 order => '99', | |
29 content => ' | |
30 Match User stats | |
31 AllowTcpForwarding no | |
32 X11Forwarding no | |
33 AllowAgentForwarding no | |
34 GatewayPorts no | |
35 ForceCommand (echo $SSH_ORIGINAL_COMMAND | grep -qv /) && cat "/var/log/
nginx/$SSH_ORIGINAL_COMMAND" | |
36 ' | |
37 } | |
38 | |
39 cron {'mirrorstats': | |
40 ensure => absent, | |
41 user => stats, | |
42 } | |
43 } | |
OLD | NEW |