Kafka limits implementation using puppet

Morning,

I keep my promise and provide you with the two simple blocks that are needed to implement limits that we discussed in article http://log-it.ro/2017/10/16/ubuntu-change-ulimit-kafka-not-ignore/

For the limits module you can use:
https://forge.puppet.com/puppetlabs/limits

As for the actual puppet implementation, I took the decision not to restart the service immediately. This being said, it’s dead simple to do it:

	 file_line {"add_pamd_record":
	 path => '/etc/pam.d/common-session',
	 line => 'session required pam_limits.so'
	 }
	 limits::fragment {
	     "*/soft/nofile":
      		value => "100000";
    		"*/hard/nofile":
      		value => "100000";
   		 "kafka/soft/nofile":
      		value => "100000";
    		"kafka/hard/nofile":
      		value => "100000";
  }

This is all you need.

Cheers