Skip to content

Commit da6e2e9

Browse files
committed
Add mod_authnz_pam
1 parent 8aed782 commit da6e2e9

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,7 @@ The following Apache modules have supported classes, many of which allow for par
13801380
* `authn_dbd`\* (see [`apache::mod::authn_dbd`][])
13811381
* `authn_file`
13821382
* `authnz_ldap`\* (see [`apache::mod::authnz_ldap`][])
1383+
* `authnz_pam`
13831384
* `authz_default`
13841385
* `authz_user`
13851386
* `autoindex`

manifests/mod/authnz_pam.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class apache::mod::authnz_pam {
2+
include ::apache
3+
::apache::mod { 'authnz_pam': }
4+
}

manifests/params.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
'7' => 'mod_ldap',
105105
default => 'mod_authz_ldap',
106106
},
107+
'authnz_pam' => 'mod_authnz_pam',
107108
'fastcgi' => 'mod_fastcgi',
108109
'fcgid' => 'mod_fcgid',
109110
'geoip' => 'mod_geoip',
@@ -237,6 +238,7 @@
237238
'auth_cas' => 'libapache2-mod-auth-cas',
238239
'auth_kerb' => 'libapache2-mod-auth-kerb',
239240
'auth_mellon' => 'libapache2-mod-auth-mellon',
241+
'authnz_pam' => 'libapache2-mod-authnz-pam',
240242
'dav_svn' => 'libapache2-svn',
241243
'fastcgi' => 'libapache2-mod-fastcgi',
242244
'fcgid' => 'libapache2-mod-fcgid',

spec/classes/mod/authnz_pam_spec.rb

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
require 'spec_helper'
2+
3+
describe 'apache::mod::authnz_pam', :type => :class do
4+
it_behaves_like "a mod class, without including apache"
5+
6+
context "default configuration with parameters" do
7+
context "on a Debian OS" do
8+
let :facts do
9+
{
10+
:lsbdistcodename => 'squeeze',
11+
:osfamily => 'Debian',
12+
:operatingsystemrelease => '6',
13+
:concat_basedir => '/dne',
14+
:id => 'root',
15+
:kernel => 'Linux',
16+
:operatingsystem => 'Debian',
17+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
18+
:is_pe => false,
19+
}
20+
end
21+
it { is_expected.to contain_class("apache") }
22+
it { is_expected.to contain_package("libapache2-mod-authnz-pam") }
23+
it { is_expected.to contain_apache__mod('authnz_pam') }
24+
end #Debian
25+
26+
context "on a RedHat OS" do
27+
let :facts do
28+
{
29+
:osfamily => 'RedHat',
30+
:operatingsystemrelease => '6',
31+
:concat_basedir => '/dne',
32+
:id => 'root',
33+
:kernel => 'Linux',
34+
:operatingsystem => 'RedHat',
35+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
36+
:is_pe => false,
37+
}
38+
end
39+
it { is_expected.to contain_class("apache") }
40+
it { is_expected.to contain_package("mod_authnz_pam") }
41+
it { is_expected.to contain_apache__mod('authnz_pam') }
42+
end # Redhat
43+
end
44+
end

0 commit comments

Comments
 (0)