From 3714707707097c48a6c3c7d6ddf85cda27b3393d Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 23 Nov 2010 01:11:07 +0000 Subject: - rewrite restricted_shell, and split the shell in its own subclass --- modules/restrictshell/manifests/init.pp | 106 ++++++++++++++++---------------- 1 file changed, 53 insertions(+), 53 deletions(-) (limited to 'modules/restrictshell') diff --git a/modules/restrictshell/manifests/init.pp b/modules/restrictshell/manifests/init.pp index c4569e94..9d65f183 100644 --- a/modules/restrictshell/manifests/init.pp +++ b/modules/restrictshell/manifests/init.pp @@ -1,55 +1,55 @@ class restrictshell { - $allow_svn = "0" - $allow_git = "0" - $allow_rsync = "0" - $allow_pkgsubmit = "0" - - $ldap_pwfile = "/etc/ldap.secret" - - class allow_svn_git_pkgsubmit { - $allow_svn = "1" - $allow_git = "1" - $allow_pkgsubmit = "1" - } - - file { '/usr/local/bin/sv_membersh.pl': - ensure => present, - owner => root, - group => root, - mode => 755, - content => template("restrictshell/sv_membersh.pl"), - } - - 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 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" + } } -- cgit v1.2.1