Skip to content

Commit

Permalink
make sure booleans are booleans and fix filter dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
crewton committed Feb 6, 2014
1 parent d6d6dee commit 396e7fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 9 additions & 3 deletions lib/puppet/type/sensu_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,22 @@ def insync?(is)
desc "Check timeout in seconds, after it fails"
end

newproperty(:aggregate) do
newproperty(:aggregate, :boolean => true) do
desc "Whether check is aggregate"

newvalues(:true, :false)
end

newproperty(:handle) do
newproperty(:handle, :boolean => true) do
desc "Whether check event send to a handler"

newvalues(:true, :false)
end

newproperty(:publish) do
newproperty(:publish, :boolean => true) do
desc "Whether check is unpublished"

newvalues(:true, :false)
end

autorequire(:package) do
Expand Down
4 changes: 3 additions & 1 deletion lib/puppet/type/sensu_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ def insync?(is)
defaultto {}
end

newproperty(:negate) do
newproperty(:negate, :boolean => true) do
desc ""

newvalues(:true, :false)
end

autorequire(:package) do
Expand Down
2 changes: 1 addition & 1 deletion manifests/filter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
owner => 'sensu',
group => 'sensu',
mode => '0444',
before => Sensu_client_subscription[$name],
before => Sensu_filter[$name],
}

sensu_filter { $name:
Expand Down

0 comments on commit 396e7fe

Please sign in to comment.