Showing with 1,498 additions and 2,866 deletions.
  1. +1 −1 .travis.yml
  2. +6 −0 Gemfile
  3. +0 −12 Modulefile
  4. +8 −0 README.md
  5. +6 −2 manifests/limits/fragment.pp
  6. +6 −9 metadata.json
  7. +526 −2,842 spec/classes/init_spec.rb
  8. +71 −0 spec/defines/limits/fragment_spec.rb
  9. +3 −0 spec/fixtures/pam_common_account.defaults.suse10
  10. +5 −0 spec/fixtures/pam_common_account.defaults.ubuntu1204
  11. +5 −0 spec/fixtures/pam_common_account.defaults.ubuntu1404
  12. +5 −0 spec/fixtures/pam_common_account.vas.suse10
  13. +7 −0 spec/fixtures/pam_common_account.vas.ubuntu1204
  14. +7 −0 spec/fixtures/pam_common_account.vas.ubuntu1404
  15. +3 −0 spec/fixtures/pam_common_account_pc.defaults.suse11
  16. +3 −0 spec/fixtures/pam_common_account_pc.defaults.suse12
  17. +5 −0 spec/fixtures/pam_common_account_pc.vas.suse11
  18. +5 −0 spec/fixtures/pam_common_account_pc.vas.suse12
  19. +4 −0 spec/fixtures/pam_common_auth.defaults.suse10
  20. +5 −0 spec/fixtures/pam_common_auth.defaults.ubuntu1204
  21. +6 −0 spec/fixtures/pam_common_auth.defaults.ubuntu1404
  22. +6 −0 spec/fixtures/pam_common_auth.vas.suse10
  23. +6 −0 spec/fixtures/pam_common_auth.vas.ubuntu1204
  24. +6 −0 spec/fixtures/pam_common_auth.vas.ubuntu1404
  25. +4 −0 spec/fixtures/pam_common_auth_pc.defaults.suse11
  26. +4 −0 spec/fixtures/pam_common_auth_pc.defaults.suse12
  27. +6 −0 spec/fixtures/pam_common_auth_pc.vas.suse11
  28. +6 −0 spec/fixtures/pam_common_auth_pc.vas.suse12
  29. +7 −0 spec/fixtures/pam_common_noninteractive_session.defaults.ubuntu1204
  30. +8 −0 spec/fixtures/pam_common_noninteractive_session.defaults.ubuntu1404
  31. +9 −0 spec/fixtures/pam_common_noninteractive_session.vas.ubuntu1204
  32. +9 −0 spec/fixtures/pam_common_noninteractive_session.vas.ubuntu1404
  33. +4 −0 spec/fixtures/pam_common_password.defaults.suse10
  34. +5 −0 spec/fixtures/pam_common_password.defaults.ubuntu1204
  35. +5 −0 spec/fixtures/pam_common_password.defaults.ubuntu1404
  36. +6 −0 spec/fixtures/pam_common_password.vas.suse10
  37. +7 −0 spec/fixtures/pam_common_password.vas.ubuntu1204
  38. +7 −0 spec/fixtures/pam_common_password.vas.ubuntu1404
  39. +4 −0 spec/fixtures/pam_common_password_pc.defaults.suse11
  40. +4 −0 spec/fixtures/pam_common_password_pc.defaults.suse12
  41. +6 −0 spec/fixtures/pam_common_password_pc.vas.suse11
  42. +6 −0 spec/fixtures/pam_common_password_pc.vas.suse12
  43. +4 −0 spec/fixtures/pam_common_session.defaults.suse10
  44. +7 −0 spec/fixtures/pam_common_session.defaults.ubuntu1204
  45. +8 −0 spec/fixtures/pam_common_session.defaults.ubuntu1404
  46. +6 −0 spec/fixtures/pam_common_session.vas.suse10
  47. +9 −0 spec/fixtures/pam_common_session.vas.ubuntu1204
  48. +9 −0 spec/fixtures/pam_common_session.vas.ubuntu1404
  49. +5 −0 spec/fixtures/pam_common_session_pc.defaults.suse11
  50. +5 −0 spec/fixtures/pam_common_session_pc.defaults.suse12
  51. +7 −0 spec/fixtures/pam_common_session_pc.vas.suse11
  52. +7 −0 spec/fixtures/pam_common_session_pc.vas.suse12
  53. +26 −0 spec/fixtures/pam_conf.defaults.solaris10
  54. +27 −0 spec/fixtures/pam_conf.defaults.solaris9
  55. +66 −0 spec/fixtures/pam_conf.vas.solaris10
  56. +27 −0 spec/fixtures/pam_conf.vas.solaris9
  57. +15 −0 spec/fixtures/pam_d_login.defaults.el5
  58. +17 −0 spec/fixtures/pam_d_login.defaults.el6
  59. +18 −0 spec/fixtures/pam_d_login.defaults.el7
  60. +10 −0 spec/fixtures/pam_d_login.defaults.suse10
  61. +12 −0 spec/fixtures/pam_d_login.defaults.suse11
  62. +10 −0 spec/fixtures/pam_d_login.defaults.suse12
  63. +11 −0 spec/fixtures/pam_d_login.defaults.suse9
  64. +16 −0 spec/fixtures/pam_d_login.defaults.ubuntu1204
  65. +17 −0 spec/fixtures/pam_d_login.defaults.ubuntu1404
  66. +9 −0 spec/fixtures/pam_d_sshd.defaults.el5
  67. +14 −0 spec/fixtures/pam_d_sshd.defaults.el6
  68. +15 −0 spec/fixtures/pam_d_sshd.defaults.el7
  69. +6 −0 spec/fixtures/pam_d_sshd.defaults.suse10
  70. +9 −0 spec/fixtures/pam_d_sshd.defaults.suse11
  71. +9 −0 spec/fixtures/pam_d_sshd.defaults.suse12
  72. +10 −0 spec/fixtures/pam_d_sshd.defaults.suse9
  73. +10 −0 spec/fixtures/pam_d_sshd.defaults.ubuntu1204
  74. +15 −0 spec/fixtures/pam_d_sshd.defaults.ubuntu1404
  75. +23 −0 spec/fixtures/pam_other.defaults.solaris11
  76. +17 −0 spec/fixtures/pam_other.defaults.suse9
  77. +23 −0 spec/fixtures/pam_other.vas.solaris11
  78. +17 −0 spec/fixtures/pam_other.vas.suse9
  79. +23 −0 spec/fixtures/pam_system_auth_ac.defaults.el5
  80. +25 −0 spec/fixtures/pam_system_auth_ac.defaults.el6
  81. +26 −0 spec/fixtures/pam_system_auth_ac.defaults.el7
  82. +31 −0 spec/fixtures/pam_system_auth_ac.vas.el5
  83. +32 −0 spec/fixtures/pam_system_auth_ac.vas.el6
  84. +33 −0 spec/fixtures/pam_system_auth_ac.vas.el7
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

sudo: false

script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'
script: 'bundle exec metadata-json-lint metadata.json && bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'

matrix:
fast_finish: true
Expand Down
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ else
gem 'puppet', :require => false
end

gem 'metadata-json-lint'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 1.0.0'
gem 'facter', '>= 1.7.0'

# rspec must be v2 for ruby 1.8.7
if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9'
gem 'rspec', '~> 2.0'
end
12 changes: 0 additions & 12 deletions Modulefile

This file was deleted.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ Places a fragment in $limits_d_dir directory
## Parameters for `pam::limits::fragment`
Source or list **must** be set.

ensure
------
String with ensure attribute for the fragment file. Valid values are 'file', 'present' and 'absent'.

- *Default*: 'file'

source
------
String - Path to the fragment file, such as 'puppet:///modules/pam/limits.nproc'
Expand All @@ -406,6 +412,8 @@ list
----
Array of lines to add to the fragment file

- *Default*: undef

===

# pam::service
Expand Down
8 changes: 6 additions & 2 deletions manifests/limits/fragment.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
define pam::limits::fragment (
$source = 'UNSET',
$list = undef,
$ensure = 'file',
) {

include pam
Expand All @@ -14,7 +15,7 @@
}

# must specify source or list
if $source == 'UNSET' and $list == undef {
if $ensure != 'absent' and $source == 'UNSET' and $list == undef {
fail('pam::limits::fragment must specify source or list.')
}

Expand All @@ -33,8 +34,11 @@
$content = template('pam/limits_fragment.erb')
}

validate_re($ensure, ['^file$', '^present$', '^absent$'],
"pam::limits::fragment::ensure <${ensure}> and must be either 'file', 'present' or 'absent'.")

file { "${pam::limits::limits_d_dir}/${name}.conf":
ensure => file,
ensure => $ensure,
source => $source_real,
content => $content,
owner => 'root',
Expand Down
15 changes: 6 additions & 9 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ghoneycutt-pam",
"version": "2.15.0",
"version": "2.16.0",
"author": "ghoneycutt",
"summary": "Manage PAM",
"license": "Apache-2.0",
Expand All @@ -10,11 +10,11 @@
"requirements": [
{
"name": "pe",
"version_requirement": "3.2.x"
"version_requirement": ">= 3.2.0 < 4.0.0"
},
{
"name": "puppet",
"version_requirement": "3.x"
"version_requirement": ">= 3.0.0 < 4.0.0"
}
],
"operatingsystem_support": [
Expand Down Expand Up @@ -91,12 +91,9 @@
}
],
"description": "Manages PAM, including specifying users and groups in access.conf, limits.conf, and limits fragments",
"types": [

],
"dependencies": [
{"name":"ghoneycutt/common","version_requirement":">= 1.0.2"},
{"name":"ghoneycutt/nsswitch","version_requirement":">= 1.1.0"},
{"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0"}
{"name":"ghoneycutt/common","version_requirement":">= 1.0.2 < 2.0.0"},
{"name":"ghoneycutt/nsswitch","version_requirement":">= 1.1.0 < 2.0.0"},
{"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"}
]
}
Loading