aboutsummaryrefslogtreecommitdiffstats
path: root/modules/restrictshell/manifests/init.pp
blob: 9d65f183fc9e29adbb21448eb4f7b2f0d6a18753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class restrictshell {
    class shell {
        file { '/usr/local/bin/sv_membersh.pl':
            ensure => present,
            owner => root,
            group => root,
            mode => 755,
            content => template("restrictshell/sv_membersh.pl"),
        }
    }

    class base {
        include shell
        $allow_svn = "0"
        $allow_git = "0"
        $allow_rsync = "0"
        $allow_pkgsubmit = "0"

        $ldap_pwfile = "/etc/ldap.secret"
        file { '/etc/membersh-conf.pl':
            ensure => present,
            owner => root,
            group => root,
            mode => 755,
            content => template("restrictshell/membersh-conf.pl"),
        }

        package { 'python-ldap':
            ensure => installed,
        }

        $pubkeys_directory = "/var/lib/pubkeys"
        file { $pubkeys_directory:
            ensure => directory,
            owner => root,
            group => root,
            mode => 755,
        }

        file { '/usr/local/bin/ldap-sshkey2file.py':
            ensure => present,
            owner => root,
            group => root,
            mode => 755,
            content => template("restrictshell/ldap-sshkey2file.py"),
            requires => Package['python-ldap']
        } 
    }

    class allow_svn_git_pkgsubmit inherits base {
        $allow_svn = "1"
        $allow_git = "1"
        $allow_pkgsubmit = "1"
    }
}