Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Have the various sensu_*_config classes autonotify their respective s…

…ervices
  • Loading branch information...
commit 97159553619293c5c7f56fbd551f55a36a8d9dff 1 parent 6d45c4c
@rodjek rodjek authored
View
9 lib/puppet/type/sensu_api_config.rb
@@ -1,6 +1,15 @@
Puppet::Type.newtype(:sensu_api_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-api]",
+ "Service[sensu-dashboard]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
View
9 lib/puppet/type/sensu_check_config.rb
@@ -1,6 +1,15 @@
Puppet::Type.newtype(:sensu_check_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-client]",
+ "Service[sensu-server]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
View
8 lib/puppet/type/sensu_client_config.rb
@@ -1,6 +1,14 @@
Puppet::Type.newtype(:sensu_client_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-client]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
View
8 lib/puppet/type/sensu_dashboard_config.rb
@@ -1,6 +1,14 @@
Puppet::Type.newtype(:sensu_dashboard_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-dashboard]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
View
8 lib/puppet/type/sensu_handler_config.rb
@@ -1,6 +1,14 @@
Puppet::Type.newtype(:sensu_handler_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-server]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
View
10 lib/puppet/type/sensu_rabbitmq_config.rb
@@ -1,6 +1,16 @@
Puppet::Type.newtype(:sensu_rabbitmq_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-server]",
+ "Service[sensu-client]",
+ "Service[sensu-api]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
View
9 lib/puppet/type/sensu_redis_config.rb
@@ -1,6 +1,15 @@
Puppet::Type.newtype(:sensu_redis_config) do
@doc = ""
+ def initialize(*args)
+ super
+
+ self[:notify] = [
+ "Service[sensu-api]",
+ "Service[sensu-server]",
+ ].select { |ref| catalog.resource(ref) }
+ end
+
ensurable do
newvalue(:present) do
provider.create
Please sign in to comment.
Something went wrong with that request. Please try again.