Configure ulimit using Puppet

puppet, ulimit

Solution

I would recommend trying to make this change using /etc/security/limits.conf, such as:

<user>   soft   core   unlimited
<user>   hard   core   unlimited

You could do so using Augeas similar to instructions found here. Not sure of your exact need/use case, but at least consider the avenue!

Problem

I am wondering how to run the ulimit command using Puppets exec type. The problem with ulimit seems to be that it isn't a binary so it has to be called using /bin/bash in front of it. I am trying to change the core file size to unlimited. I have this but doesn't recognise ulimit. ``` exec {"ulimit": command => "/bin/bash ulimit -c unlimited", } ``` I can execute 'ulimit -c unlimited' in the command line and it will change the value no problem. The problem is doing this through Puppet. Any help would be great.

Original source