Unverified Commit 180d5de5 authored by Tim Smith's avatar Tim Smith Committed by GitHub
Browse files

Merge pull request #74 from jjlimepoint/chef16-fix

Chef16 fix
parents 73c505b5 8433c342
......@@ -3,8 +3,8 @@ require 'chef/resource'
class Chef
class Resource
class UlimitDomain < Chef::Resource
provides :ulimit_domain
resource_name :ulimit_domain
property :domain, String
property :domain_name, String, name_property: true
property :filename, String
......@@ -17,7 +17,11 @@ class Chef
urule = Chef::Resource::UlimitRule.new("#{new_resource.name}:#{name}]", nil)
urule.domain new_resource
urule.action :nothing
urule.instance_eval(&block)
begin
urule.instance_eval(&block)
rescue
urule.instance_eval('"anonymous"', &block)
end
unless name
urule.name "ulimit_rule[#{new_resource.name}:#{urule.item}-#{urule.type}-#{urule.value}]"
end
......
......@@ -3,6 +3,8 @@ require 'chef/resource'
class Chef
class Resource
class UlimitRule < Chef::Resource
provides :ulimit_rule
property :type, [Symbol, String], required: true
property :item, [Symbol, String], required: true
property :value, [String, Numeric], required: true
......
resource_name :user_ulimit
provides :user_ulimit
property :username, String, name_property: true
property :filehandle_limit, [String, Integer]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment