Revert "add Limits module for Puppet"

This reverts commit 98cedba41e.

* remove limit set.
* this settings broke deploy
* Revert "rising file limits" 11a7c94cdd.
This commit is contained in:
Sergey Vasilenko 2013-07-18 14:21:36 +04:00
parent 40e3b410f3
commit 92c653bf33
7 changed files with 0 additions and 125 deletions

View File

@ -1,15 +0,0 @@
Copyright (C) 2012 Puppet Labs Inc
Puppet Labs can be contacted at: info@puppetlabs.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,11 +0,0 @@
name 'puppetlabs-limits'
version '0.0.1'
source 'https://github.com/puppetlabs/puppetlabs-limits'
author 'puppetlabs'
license 'Apache 2.0'
summary 'Defined resource type for managing /etc/security/limits'
description 'Uses the file fragment pattern'
project_page 'https://github.com/puppetlabs/puppetlabs-limits'
## Add dependencies, if any:
# dependency 'username/name', '>= 1.2.0'

View File

@ -1,17 +0,0 @@
# Limits module for Puppet
## Description
Module for managing pam limits in /etc/security/limits.conf
## Usage
### limits::fragment
<pre>
limits::fragment {
"*/soft/nofile":
value => "1024";
"*/hard/nofile":
value => "8192";
}
</pre>

View File

@ -1,25 +0,0 @@
# Class: limits
#
# This module manages limits
#
# Parameters:
# $title - should be of the form domain/(hard|soft)/item
# $value - value of limit
#
# Actions:
# creates a fragment fil corresponing to each limit entry
define limits::fragment (
$value
) {
include limits
if ( ! ($title =~ /\S+\/(hard|soft)\/\S+/)) {
fail("invalid limits format: ${title}")
}
$file_name = regsubst($title, '\/', '_', 'G')
file { "${limits::fragments_dir}/${file_name}.txt":
content => inline_template("<%= title.gsub('/', ' ') %> <%= value %>\n"),
before => Exec['cp_limits']
}
}

View File

@ -1,37 +0,0 @@
# Class: limits
#
# Class responsible for concatenating the limits fragments.
#
# Parameters:
# - final file to be written to
#
# Actions:
#
class limits(
$limits_file = '/etc/security/limits.conf'
) {
$fragments_dir = '/etc/puppet/tmp/limits_fragments.d/'
$tmp_limits_conf = '/etc/puppet/tmp/limits.conf'
file { [ '/etc/puppet/tmp', $fragments_dir ]:
ensure => directory,
recurse => true,
purge => true,
owner => 'puppet',
group => 'puppet',
mode => '600',
}
exec { 'cp_limits':
command => "/bin/cp ${tmp_limits_conf} ${limits_file}",
onlyif => "/bin/cat ${fragments_dir}/* > ${tmp_limits_conf} && ! diff ${tmp_limits_conf} ${limits_file}",
require => File[$fragments_dir]
}
file { $limits_file:
owner => 'root',
group => 'root',
mode => '0644',
require => Exec['cp_limits']
}
}

View File

@ -1,12 +0,0 @@
class { 'limits':
limits_file => '/tmp/limits.conf'
}
limits::fragment { 'joe/soft/nproc':
value => '10'
}
limits::fragment { 'dan/soft/nproc':
value => '10'
}
#limits::fragment { 'bob/hard/nproc':
# value => '10'
#}

View File

@ -18,12 +18,4 @@ class operatingsystem::checksupported (
notify { 'operatingsystem':
message => "Detected OS $::operatingsystem, architecture $::architecture"
}
limits::fragment {
"*/soft/nofile":
value => "32768";
"*/hard/nofile":
value => "32768";
}
}