add Pacemaker-aware alternative service provider

This is an alternative provider for Chef's "service" platform resource.
It allows us to make an existing service resource Pacemaker-aware by
adding a single line to the service block.
This commit is contained in:
Adam Spiers
2014-03-13 18:34:21 +00:00
parent 73edd77d1a
commit 5140ad4cb6

View File

@@ -25,7 +25,7 @@ class Chef
def standard_load_current_resource
name = @new_resource.name
cib_object = Pacemaker::CIBObject.from_name(name)
cib_object = ::Pacemaker::CIBObject.from_name(name)
unless cib_object
::Chef::Log.debug "CIB object definition nil or empty"
return
@@ -55,7 +55,7 @@ class Chef
action :nothing
end.run_action(:run)
created_cib_object = Pacemaker::CIBObject.from_name(new_resource.name)
created_cib_object = ::Pacemaker::CIBObject.from_name(new_resource.name)
raise "Failed to create #{cib_object}" if created_cib_object.nil?
unless created_cib_object.exists?