Skip to content

title pattern for simpler definition#28

Merged
saz merged 12 commits intosaz:masterfrom
pgassmann:master
Nov 16, 2016
Merged

title pattern for simpler definition#28
saz merged 12 commits intosaz:masterfrom
pgassmann:master

Conversation

@pgassmann
Copy link
Contributor

This Pull request contains:

The title pattern is inspired by puppetlabs-limits

Only change for existing users is that the filenames could change if $name ist not with .conf and it does not use the username_nofile / default_nofile pattern as title.

How to use

Set limits using title pattern:

    limits::limits{'*/nofile':
      hard => 1048576,
      soft => 1048576,
    }
    limits::limits{'root/nofile': both => 1048576; }

Using hiera

Puppet:

    include ::limits

Hiera:

    limits::entries:
      'root/nofile':
        both: 1048576
      '*/memlock':
        both: unlimited

jfroche and others added 12 commits March 30, 2016 13:32
Without this patch spec tests are failing with the following error:

    Resolving dependencies...
    Bundler could not find compatible versions for gem "puppet-lint":
      In Gemfile:
        puppet-lint-variable_contains_upcase (>= 0) ruby depends on
          puppet-lint (~> 1.0) ruby
        puppet-lint (2.0.0)
Without this patch the use of the limits module in conjunction with the
[pam][pam] module causes the following error:

    Failed to apply catalog: Cannot alias File[limits_d] to ["/etc/security/limits.d"] at
    /etc/puppet/ghoneycutt-modules/pam/manifests/limits.pp:62;
    resource ["File", "/etc/security/limits.d"] already declared at
    /etc/puppet/environments/development/modules/limits/manifests/init.pp:15

This patch addresses the issue by allowing the end user to disable management of
the limits.d directory.  This is desirable because the end user may still wish
to manage limits using the `limits::entries` Hiera data value in conjunction
with the pam module.

[pam]: https://git.io/v6qAH
@pgassmann
Copy link
Contributor Author

Open for a month. Can you merge and update? Otherwise I will publish it in under my name.

@saz saz merged commit d3f852a into saz:master Nov 16, 2016
@pgassmann pgassmann mentioned this pull request Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants