Skip to content

Commit 87c5d02

Browse files
authored
Merge pull request #278 from ghoneycutt/debian12
Debian12
2 parents dffa455 + f78b8da commit 87c5d02

20 files changed

+203
-58
lines changed

.devcontainer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# devcontainer
22

33

4-
For format details, see https://aka.ms/devcontainer.json.
4+
For format details, see https://aka.ms/devcontainer.json.
55

66
For config options, see the README at:
77
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
8-
8+
99
``` json
1010
{
1111
"name": "Puppet Development Kit (Community)",

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
- "el8"
5959
- "el9"
6060
- "debian-11"
61+
- "debian-12"
6162
- "ubuntu-2004"
6263
- "ubuntu-2204"
6364
puppet:
@@ -66,7 +67,7 @@ jobs:
6667
env:
6768
BUNDLE_WITHOUT: development:release
6869
BEAKER_debug: true
69-
name:
70+
name:
7071
steps:
7172
- name: Enable IPv6 on docker
7273
run: |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ module aims to support the current and previous major Puppet versions.
277277
* Amazon Linux 2
278278
* Debian 10
279279
* Debian 11
280+
* Debian 12
280281
* Ubuntu 20.04 LTS
281282
* Ubuntu 22.04 LTS
282283

data/os/Debian/12.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
pam::common_files_create_links: false
3+
pam::common_files_suffix: ~
4+
pam::common_files:
5+
- common_account
6+
- common_auth
7+
- common_password
8+
- common_session
9+
- common_session_noninteractive
10+
11+
pam::pam_d_login_template: pam/login.debian12.erb
12+
pam::pam_d_sshd_template: pam/sshd.debian12.erb
13+
pam::package_name: libpam0g
14+
pam::pam_auth_lines:
15+
- 'auth [success=1 default=ignore] pam_unix.so nullok'
16+
- 'auth requisite pam_deny.so'
17+
- 'auth required pam_permit.so'
18+
pam::pam_account_lines:
19+
- 'account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so'
20+
- 'account requisite pam_deny.so'
21+
- 'account required pam_permit.so'
22+
pam::pam_password_lines:
23+
- 'password [success=1 default=ignore] pam_unix.so obscure yescrypt'
24+
- 'password requisite pam_deny.so'
25+
- 'password required pam_permit.so'
26+
pam::pam_session_lines:
27+
- 'session [default=1] pam_permit.so'
28+
- 'session requisite pam_deny.so'
29+
- 'session required pam_permit.so'
30+
- 'session required pam_unix.so'
31+
- 'session optional pam_systemd.so'

manifests/faillock.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# The faillock 'root_unlock_time' config option
3535
# @param admin_group
3636
# The faillock 'admin_group' config option
37-
#
37+
#
3838
class pam::faillock (
3939
Stdlib::Absolutepath $config_file = '/etc/security/faillock.conf',
4040
String[1] $config_file_owner = 'root',

manifests/init.pp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -253,26 +253,6 @@
253253
Boolean $common_files_create_links = false,
254254
Optional[String] $common_files_suffix = undef,
255255
) {
256-
# Fail on unsupported platforms
257-
if $facts['os']['family'] == 'RedHat' and !($facts['os']['release']['major'] in ['2','5','6','7','8', '9']) {
258-
fail("osfamily RedHat's os.release.major is <${::facts['os']['release']['major']}> and must be 2, 5, 6, 7, 8 or 9")
259-
}
260-
261-
if $facts['os']['family'] == 'Solaris' and !($facts['kernelrelease'] in ['5.9','5.10','5.11']) {
262-
fail("osfamily Solaris' kernelrelease is <${facts['kernelrelease']}> and must be 5.9, 5.10 or 5.11")
263-
}
264-
265-
if $facts['os']['family'] == 'Suse' and !($facts['os']['release']['major'] in ['9','10','11','12','13','15']) {
266-
fail("osfamily Suse's os.release.major is <${::facts['os']['release']['major']}> and must be 9, 10, 11, 12, 13 or 15")
267-
}
268-
269-
if $facts['os']['name'] == 'Debian' and !($facts['os']['release']['major'] in ['7','8','9','10', '11']) {
270-
fail("Debian's os.release.major is <${facts['os']['release']['major']}> and must be 7, 8, 9, 10 or 11")
271-
}
272-
273-
if $facts['os']['name'] == 'Ubuntu' and !($facts['os']['release']['major'] in ['12.04', '14.04', '16.04', '18.04', '20.04', '22.04']) {
274-
fail("Ubuntu's os.release.major is <${facts['os']['release']['major']}> and must be 12.04, 14.04, 16.04, 18.04, 20.04 or 22.04")
275-
}
276256

277257
if $pam_d_sshd_template == 'pam/sshd.custom.erb' {
278258
unless $pam_sshd_auth_lines and

metadata.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": [
1111
{
1212
"name": "puppet/nsswitch",
13-
"version_requirement": ">= 3.0.0 < 4.0.0"
13+
"version_requirement": ">= 3.2.0 < 4.0.0"
1414
},
1515
{
1616
"name": "puppetlabs/stdlib",
@@ -27,7 +27,8 @@
2727
{
2828
"operatingsystem": "Debian",
2929
"operatingsystemrelease": [
30-
"11"
30+
"11",
31+
"12"
3132
]
3233
},
3334
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
HOSTS:
2+
debian12:
3+
roles:
4+
- agent
5+
platform: debian-12-amd64
6+
hypervisor: docker
7+
image: debian:12
8+
docker_preserve_image: true
9+
docker_cmd:
10+
- '/sbin/init'
11+
docker_image_commands:
12+
- 'apt-get install -y wget net-tools systemd-sysv locales apt-transport-https ca-certificates'
13+
- 'echo "LC_ALL=en_US.UTF-8" >> /etc/environment'
14+
- 'echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen'
15+
- 'echo "LANG=en_US.UTF-8" > /etc/locale.conf'
16+
- 'locale-gen en_US.UTF-8'
17+
docker_env:
18+
- LANG=en_US.UTF-8
19+
- LANGUAGE=en_US.UTF-8
20+
- LC_ALL=en_US.UTF-8
21+
docker_container_name: 'pam-debian12'
22+
CONFIG:
23+
log_level: debug
24+
type: foss
25+
ssh:
26+
password: root
27+
auth_methods: ["password"]

spec/classes/init_spec.rb

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -352,36 +352,4 @@
352352
end
353353
end
354354
end
355-
356-
describe 'on unsupported platforms' do
357-
context 'with defaults params on Debian 6' do
358-
let(:facts) { { os: { 'name' => 'Debian', 'release' => { 'major' => '6' } } } }
359-
360-
it { is_expected.to compile.and_raise_error(%r{must be}) }
361-
end
362-
363-
context 'with defaults params on RedHat 4' do
364-
let(:facts) { { os: { 'family' => 'RedHat', 'release' => { 'major' => '4' } } } }
365-
366-
it { is_expected.to compile.and_raise_error(%r{must be}) }
367-
end
368-
369-
context 'with defaults params on Solaris 8' do
370-
let(:facts) { { os: { 'family' => 'Solaris' }, kernelrelease: '5.8' } }
371-
372-
it { is_expected.to compile.and_raise_error(%r{must be}) }
373-
end
374-
375-
context 'with defaults params on SLES 8' do
376-
let(:facts) { { os: { 'family' => 'Suse', 'release' => { 'major' => '8' } } } }
377-
378-
it { is_expected.to compile.and_raise_error(%r{must be}) }
379-
end
380-
381-
context 'with defaults params on Ubuntu 10.04' do
382-
let(:facts) { { os: { 'name' => 'Ubuntu', 'release' => { 'major' => '10.04' } } } }
383-
384-
it { is_expected.to compile.and_raise_error(%r{must be}) }
385-
end
386-
end
387355
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is being maintained by Puppet.
2+
# DO NOT EDIT
3+
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
4+
account requisite pam_deny.so
5+
account required pam_permit.so

0 commit comments

Comments
 (0)