negate conditional to simplify indentation

This commit is contained in:
Adam Spiers
2014-01-09 12:12:59 +00:00
parent a19cca3b68
commit 1b5e9ca6a8

View File

@@ -26,7 +26,8 @@ action :create do
name = new_resource.name name = new_resource.name
agent = new_resource.agent agent = new_resource.agent
unless resource_exists?(name) return if resource_exists?(name)
cmd = "crm configure primitive #{name} #{agent}" cmd = "crm configure primitive #{name} #{agent}"
if new_resource.params and !(new_resource.params.empty?) if new_resource.params and !(new_resource.params.empty?)
@@ -70,7 +71,6 @@ action :create do
Chef::Log.error "Failed to configure primitive #{name}." Chef::Log.error "Failed to configure primitive #{name}."
end end
end end
end
action :delete do action :delete do
name = new_resource.name name = new_resource.name