Showing with 1,873 additions and 2,051 deletions.
  1. +6 −0 .devcontainer/Dockerfile
  2. +38 −0 .devcontainer/README.md
  3. +17 −0 .devcontainer/devcontainer.json
  4. +5 −0 .gitattributes
  5. +10 −0 .github/dependabot.yml
  6. +34 −0 .github/workflows/run-pdk-tests-on-puppet-7.7.yml
  7. +26 −37 .gitignore
  8. +47 −0 .pdkignore
  9. +0 −1 .puppet-lint.rc
  10. +2 −0 .rspec
  11. +401 −54 .rubocop.yml
  12. +21 −0 .sync.yml
  13. +0 −141 .travis.yml
  14. +6 −0 .vscode/extensions.json
  15. +1 −0 .yardopts
  16. +59 −34 Gemfile
  17. +2 −1 README.md
  18. +81 −21 Rakefile
  19. +14 −7 Vagrantfile
  20. +1 −0 data/common.yaml
  21. +31 −0 data/os/Debian/11.yaml
  22. +17 −24 data/os/RedHat/8.yaml
  23. +2 −3 manifests/accesslogin.pp
  24. +54 −64 manifests/init.pp
  25. +3 −5 manifests/limits.pp
  26. +4 −6 manifests/limits/fragment.pp
  27. +0 −1 manifests/service.pp
  28. +20 −16 metadata.json
  29. +2 −0 pdk.yaml
  30. +50 −49 spec/acceptance/00_pam_spec.rb
  31. +24 −0 spec/acceptance/nodesets/debian-11.yml
  32. +0 −25 spec/acceptance/nodesets/debian-8.yml
  33. +113 −151 spec/classes/accesslogin_spec.rb
  34. +212 −384 spec/classes/init_spec.rb
  35. +153 −192 spec/classes/limits_spec.rb
  36. +8 −0 spec/default_facts.yml
  37. +64 −102 spec/defines/limits/fragment_spec.rb
  38. +60 −101 spec/defines/service_spec.rb
  39. 0 spec/fixtures/{pam_common_account.defaults.debian10 → debian-10-x86_64-pam_common_account}
  40. +2 −2 spec/fixtures/{pam_common_auth.defaults.ubuntu1604 → debian-10-x86_64-pam_common_auth}
  41. 0 spec/fixtures/{pam_common_password.defaults.debian10 → debian-10-x86_64-pam_common_password}
  42. 0 spec/fixtures/{pam_common_session.defaults.debian10 → debian-10-x86_64-pam_common_session}
  43. 0 ...on_session_noninteractive.defaults.debian10 → debian-10-x86_64-pam_common_session_noninteractive}
  44. 0 spec/fixtures/{pam_d_login.defaults.debian10 → debian-10-x86_64-pam_d_login}
  45. 0 spec/fixtures/{pam_d_sshd.defaults.ubuntu2004 → debian-10-x86_64-pam_d_sshd}
  46. 0 spec/fixtures/{pam_common_account.defaults.debian7 → debian-11-x86_64-pam_common_account}
  47. +5 −0 spec/fixtures/debian-11-x86_64-pam_common_auth
  48. +5 −0 spec/fixtures/debian-11-x86_64-pam_common_password
  49. +7 −0 spec/fixtures/debian-11-x86_64-pam_common_session
  50. +7 −0 spec/fixtures/debian-11-x86_64-pam_common_session_noninteractive
  51. 0 spec/fixtures/{pam_d_login.defaults.ubuntu2004 → debian-11-x86_64-pam_d_login}
  52. +2 −0 spec/fixtures/{pam_d_sshd.defaults.debian10 → debian-11-x86_64-pam_d_sshd}
  53. 0 spec/fixtures/{pam_common_account.defaults.debian8 → debian-7-x86_64-pam_common_account}
  54. 0 spec/fixtures/{pam_common_auth.defaults.debian10 → debian-7-x86_64-pam_common_auth}
  55. 0 spec/fixtures/{pam_common_password.defaults.debian7 → debian-7-x86_64-pam_common_password}
  56. 0 spec/fixtures/{pam_common_session.defaults.debian7 → debian-7-x86_64-pam_common_session}
  57. 0 ...ixtures/{pam_common_session.defaults.debian8 → debian-7-x86_64-pam_common_session_noninteractive}
  58. 0 spec/fixtures/{pam_d_login.defaults.debian7 → debian-7-x86_64-pam_d_login}
  59. 0 spec/fixtures/{pam_d_sshd.defaults.debian7 → debian-7-x86_64-pam_d_sshd}
  60. 0 spec/fixtures/{pam_common_account.defaults.debian9 → debian-8-x86_64-pam_common_account}
  61. 0 spec/fixtures/{pam_common_auth.defaults.debian7 → debian-8-x86_64-pam_common_auth}
  62. 0 spec/fixtures/{pam_common_password.defaults.debian8 → debian-8-x86_64-pam_common_password}
  63. 0 ...ixtures/{pam_common_session_noninteractive.defaults.debian7 → debian-8-x86_64-pam_common_session}
  64. 0 ...mmon_session_noninteractive.defaults.debian8 → debian-8-x86_64-pam_common_session_noninteractive}
  65. 0 spec/fixtures/{pam_d_login.defaults.debian8 → debian-8-x86_64-pam_d_login}
  66. 0 spec/fixtures/{pam_d_sshd.defaults.debian8 → debian-8-x86_64-pam_d_sshd}
  67. 0 spec/fixtures/{pam_common_account.defaults.ubuntu1204 → debian-9-x86_64-pam_common_account}
  68. 0 spec/fixtures/{pam_common_auth.defaults.debian9 → debian-9-x86_64-pam_common_auth}
  69. 0 spec/fixtures/{pam_common_password.defaults.debian9 → debian-9-x86_64-pam_common_password}
  70. 0 spec/fixtures/{pam_common_session.defaults.debian9 → debian-9-x86_64-pam_common_session}
  71. 0 ...mmon_session_noninteractive.defaults.debian9 → debian-9-x86_64-pam_common_session_noninteractive}
  72. 0 spec/fixtures/{pam_d_login.defaults.debian9 → debian-9-x86_64-pam_d_login}
  73. 0 spec/fixtures/{pam_d_sshd.defaults.debian9 → debian-9-x86_64-pam_d_sshd}
  74. 0 spec/fixtures/{pam_d_login.defaults.el5 → redhat-5-x86_64-pam_d_login}
  75. 0 spec/fixtures/{pam_d_sshd.defaults.el5 → redhat-5-x86_64-pam_d_sshd}
  76. 0 spec/fixtures/{pam_system_auth_ac.defaults.el5 → redhat-5-x86_64-pam_system_auth_ac}
  77. 0 spec/fixtures/{pam_d_login.defaults.el6 → redhat-6-x86_64-pam_d_login}
  78. 0 spec/fixtures/{pam_d_sshd.defaults.el6 → redhat-6-x86_64-pam_d_sshd}
  79. 0 spec/fixtures/{pam_password_auth_ac.defaults.el6 → redhat-6-x86_64-pam_password_auth_ac}
  80. 0 spec/fixtures/{pam_system_auth_ac.defaults.el6 → redhat-6-x86_64-pam_system_auth_ac}
  81. 0 spec/fixtures/{pam_d_login.defaults.el7 → redhat-7-x86_64-pam_d_login}
  82. 0 spec/fixtures/{pam_d_sshd.defaults.el7 → redhat-7-x86_64-pam_d_sshd}
  83. 0 spec/fixtures/{pam_password_auth_ac.defaults.el7 → redhat-7-x86_64-pam_password_auth_ac}
  84. 0 spec/fixtures/{pam_system_auth_ac.defaults.el7 → redhat-7-x86_64-pam_system_auth_ac}
  85. 0 spec/fixtures/{pam_d_login.defaults.el8 → redhat-8-x86_64-pam_d_login}
  86. 0 spec/fixtures/{pam_d_sshd.defaults.el8 → redhat-8-x86_64-pam_d_sshd}
  87. +7 −3 spec/fixtures/{pam_password_auth_ac.defaults.el8 → redhat-8-x86_64-pam_password_auth_ac}
  88. 0 spec/fixtures/{pam_system_auth_ac.defaults.el8 → redhat-8-x86_64-pam_system_auth_ac}
  89. 0 spec/fixtures/{pam_common_account.defaults.suse10 → sles-10-x86_64-pam_common_account}
  90. 0 spec/fixtures/{pam_common_auth.defaults.suse10 → sles-10-x86_64-pam_common_auth}
  91. 0 spec/fixtures/{pam_common_password.defaults.suse10 → sles-10-x86_64-pam_common_password}
  92. 0 spec/fixtures/{pam_common_session.defaults.suse10 → sles-10-x86_64-pam_common_session}
  93. 0 spec/fixtures/{pam_d_login.defaults.suse10 → sles-10-x86_64-pam_d_login}
  94. 0 spec/fixtures/{pam_d_sshd.defaults.suse10 → sles-10-x86_64-pam_d_sshd}
  95. 0 spec/fixtures/{pam_common_account_pc.defaults.suse11 → sles-11-x86_64-pam_common_account_pc}
  96. 0 spec/fixtures/{pam_common_auth_pc.defaults.suse11 → sles-11-x86_64-pam_common_auth_pc}
  97. 0 spec/fixtures/{pam_common_password_pc.defaults.suse11 → sles-11-x86_64-pam_common_password_pc}
  98. 0 spec/fixtures/{pam_common_session_pc.defaults.suse11 → sles-11-x86_64-pam_common_session_pc}
  99. 0 spec/fixtures/{pam_d_login.defaults.suse11 → sles-11-x86_64-pam_d_login}
  100. 0 spec/fixtures/{pam_d_sshd.defaults.suse11 → sles-11-x86_64-pam_d_sshd}
  101. 0 spec/fixtures/{pam_common_account_pc.defaults.suse12 → sles-12-x86_64-pam_common_account_pc}
  102. 0 spec/fixtures/{pam_common_auth_pc.defaults.suse12 → sles-12-x86_64-pam_common_auth_pc}
  103. 0 spec/fixtures/{pam_common_password_pc.defaults.suse12 → sles-12-x86_64-pam_common_password_pc}
  104. 0 spec/fixtures/{pam_common_session_pc.defaults.suse12 → sles-12-x86_64-pam_common_session_pc}
  105. 0 spec/fixtures/{pam_d_login.defaults.suse12 → sles-12-x86_64-pam_d_login}
  106. 0 spec/fixtures/{pam_d_sshd.defaults.suse12 → sles-12-x86_64-pam_d_sshd}
  107. 0 spec/fixtures/{pam_common_account_pc.defaults.suse13 → sles-13-x86_64-pam_common_account_pc}
  108. 0 spec/fixtures/{pam_common_auth_pc.defaults.suse13 → sles-13-x86_64-pam_common_auth_pc}
  109. 0 spec/fixtures/{pam_common_password_pc.defaults.suse13 → sles-13-x86_64-pam_common_password_pc}
  110. 0 spec/fixtures/{pam_common_session_pc.defaults.suse13 → sles-13-x86_64-pam_common_session_pc}
  111. 0 spec/fixtures/{pam_d_login.defaults.suse13 → sles-13-x86_64-pam_d_login}
  112. 0 spec/fixtures/{pam_d_sshd.defaults.suse13 → sles-13-x86_64-pam_d_sshd}
  113. 0 spec/fixtures/{pam_common_account_pc.defaults.suse15 → sles-15-x86_64-pam_common_account_pc}
  114. 0 spec/fixtures/{pam_common_auth_pc.defaults.suse15 → sles-15-x86_64-pam_common_auth_pc}
  115. 0 spec/fixtures/{pam_common_password_pc.defaults.suse15 → sles-15-x86_64-pam_common_password_pc}
  116. 0 spec/fixtures/{pam_common_session_pc.defaults.suse15 → sles-15-x86_64-pam_common_session_pc}
  117. 0 spec/fixtures/{pam_d_login.defaults.suse15 → sles-15-x86_64-pam_d_login}
  118. 0 spec/fixtures/{pam_d_sshd.defaults.suse15 → sles-15-x86_64-pam_d_sshd}
  119. 0 spec/fixtures/{pam_d_login.defaults.suse9 → sles-9-x86_64-pam_d_login}
  120. 0 spec/fixtures/{pam_d_sshd.defaults.suse9 → sles-9-x86_64-pam_d_sshd}
  121. 0 spec/fixtures/{pam_other.defaults.suse9 → sles-9-x86_64-pam_other}
  122. 0 spec/fixtures/{pam_conf.defaults.solaris10 → solaris-10-i86pc-pam_conf}
  123. 0 spec/fixtures/{pam_other.defaults.solaris11 → solaris-11-i86pc-pam_other}
  124. 0 spec/fixtures/{pam_conf.defaults.solaris9 → solaris-9-i86pc-pam_conf}
  125. 0 spec/fixtures/{pam_common_account.defaults.ubuntu1404 → ubuntu-12.04-x86_64-pam_common_account}
  126. 0 spec/fixtures/{pam_common_auth.defaults.debian8 → ubuntu-12.04-x86_64-pam_common_auth}
  127. 0 spec/fixtures/{pam_common_password.defaults.ubuntu1204 → ubuntu-12.04-x86_64-pam_common_password}
  128. 0 spec/fixtures/{pam_common_session.defaults.ubuntu1204 → ubuntu-12.04-x86_64-pam_common_session}
  129. 0 ...ssion_noninteractive.defaults.ubuntu1204 → ubuntu-12.04-x86_64-pam_common_session_noninteractive}
  130. 0 spec/fixtures/{pam_d_login.defaults.ubuntu1204 → ubuntu-12.04-x86_64-pam_d_login}
  131. 0 spec/fixtures/{pam_d_sshd.defaults.ubuntu1204 → ubuntu-12.04-x86_64-pam_d_sshd}
  132. 0 spec/fixtures/{pam_common_account.defaults.ubuntu1604 → ubuntu-14.04-x86_64-pam_common_account}
  133. 0 spec/fixtures/{pam_common_auth.defaults.ubuntu1404 → ubuntu-14.04-x86_64-pam_common_auth}
  134. 0 spec/fixtures/{pam_common_password.defaults.ubuntu1404 → ubuntu-14.04-x86_64-pam_common_password}
  135. 0 spec/fixtures/{pam_common_session.defaults.ubuntu1404 → ubuntu-14.04-x86_64-pam_common_session}
  136. 0 .../{pam_common_session.defaults.ubuntu1604 → ubuntu-14.04-x86_64-pam_common_session_noninteractive}
  137. 0 spec/fixtures/{pam_d_login.defaults.ubuntu1404 → ubuntu-14.04-x86_64-pam_d_login}
  138. 0 spec/fixtures/{pam_d_sshd.defaults.ubuntu1404 → ubuntu-14.04-x86_64-pam_d_sshd}
  139. 0 spec/fixtures/{pam_common_account.defaults.ubuntu1804 → ubuntu-16.04-x86_64-pam_common_account}
  140. 0 spec/fixtures/{pam_common_auth.defaults.ubuntu1204 → ubuntu-16.04-x86_64-pam_common_auth}
  141. 0 spec/fixtures/{pam_common_password.defaults.ubuntu1604 → ubuntu-16.04-x86_64-pam_common_password}
  142. 0 spec/fixtures/{pam_common_session.defaults.ubuntu1804 → ubuntu-16.04-x86_64-pam_common_session}
  143. 0 .../{pam_common_session.defaults.ubuntu2004 → ubuntu-16.04-x86_64-pam_common_session_noninteractive}
  144. 0 spec/fixtures/{pam_d_login.defaults.ubuntu1604 → ubuntu-16.04-x86_64-pam_d_login}
  145. +2 −0 spec/fixtures/{pam_d_sshd.defaults.ubuntu1604 → ubuntu-16.04-x86_64-pam_d_sshd}
  146. 0 spec/fixtures/{pam_common_account.defaults.ubuntu2004 → ubuntu-18.04-x86_64-pam_common_account}
  147. 0 spec/fixtures/{pam_common_auth.defaults.ubuntu1804 → ubuntu-18.04-x86_64-pam_common_auth}
  148. 0 spec/fixtures/{pam_common_password.defaults.ubuntu1804 → ubuntu-18.04-x86_64-pam_common_password}
  149. 0 .../{pam_common_session_noninteractive.defaults.ubuntu1404 → ubuntu-18.04-x86_64-pam_common_session}
  150. 0 ...ssion_noninteractive.defaults.ubuntu1604 → ubuntu-18.04-x86_64-pam_common_session_noninteractive}
  151. 0 spec/fixtures/{pam_d_login.defaults.ubuntu1804 → ubuntu-18.04-x86_64-pam_d_login}
  152. 0 spec/fixtures/{pam_d_sshd.defaults.ubuntu1804 → ubuntu-18.04-x86_64-pam_d_sshd}
  153. +5 −0 spec/fixtures/ubuntu-20.04-x86_64-pam_common_account
  154. 0 spec/fixtures/{pam_common_auth.defaults.ubuntu2004 → ubuntu-20.04-x86_64-pam_common_auth}
  155. 0 spec/fixtures/{pam_common_password.defaults.ubuntu2004 → ubuntu-20.04-x86_64-pam_common_password}
  156. 0 .../{pam_common_session_noninteractive.defaults.ubuntu1804 → ubuntu-20.04-x86_64-pam_common_session}
  157. 0 ...ssion_noninteractive.defaults.ubuntu2004 → ubuntu-20.04-x86_64-pam_common_session_noninteractive}
  158. +18 −0 spec/fixtures/ubuntu-20.04-x86_64-pam_d_login
  159. +16 −0 spec/fixtures/ubuntu-20.04-x86_64-pam_d_sshd
  160. +0 −8 spec/hiera.yaml
  161. +65 −610 spec/spec_helper.rb
  162. +0 −5 spec/spec_helper_local.rb
  163. +102 −0 spec/spec_platforms.rb
  164. +18 −0 templates/login.debian11.erb
  165. +18 −0 templates/sshd.debian11.erb
  166. +2 −0 templates/sshd.ubuntu16.erb
  167. +2 −2 tests/provision_basic_debian.sh
  168. +2 −2 tests/provision_basic_el.sh
6 changes: 6 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM puppet/pdk:latest

# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

38 changes: 38 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# devcontainer


For format details, see https://aka.ms/devcontainer.json.

For config options, see the README at:
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet

``` json
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pdk --version",
}
```



17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]
}
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.epp eol=lf
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
assignees:
- ghoneycutt
34 changes: 34 additions & 0 deletions .github/workflows/run-pdk-tests-on-puppet-7.7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run PDK tests on Puppet 7.7

on:
- push
- pull_request

jobs:
validate-7_7:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run pdk validate
uses: puppets-epic-show-theatre/action-pdk-validate@v1
with:
puppet-version: "7.7"
# [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
# pe-version: ""
# [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".

test-7_7:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Run unit tests
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
with:
puppet-version: "7.7"
# [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5".
# pe-version: ""
# [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".
63 changes: 26 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
# Default .gitignore for Ruby
*.gem
*.rbc
.bundle
.config
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
Gemfile.lock

# YARD artifacts
.git/
.*.sw[op]
.metadata
.yardoc
_yardoc
doc/

# Vim
*.swp

# Eclipse
.project

# OS X
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store

# Puppet
coverage/
spec/fixtures/manifests/*
spec/fixtures/modules/*
log/

# Vagrant
.vagrant/*
ubuntu*.log
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
47 changes: 47 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.travis.yml
/.yardopts
/spec/
/.vscode/
/.sync.yml
/.devcontainer/
1 change: 0 additions & 1 deletion .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--relative
--fail_on_warnings
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
Loading