cookbook-pacemaker/spec/fixtures/resource_group.rb
Adam Spiers fdebd24117 newly created resources should not be started
In Pacemaker, target-role defaults to 'Started', but we want to allow
consumers of the LWRPs the choice whether their newly created resource
gets started or not, and we also want to adhere to the Principle of
Least Surprise.  Therefore we stick to the intuitive semantics that

  action :create

creates the resource with target-role="Stopped" in order to prevent it
from starting immediately, whereas

  action [:create, :start]

creates the resource and then starts it.

Since we are honouring :start / :stop actions to determine the
target-role value, if target-role is specified via meta, it will just be
overridden anyway.  So we also deprecate direct use of target-role meta
parameter in recipes.
2014-04-10 23:53:20 +01:00

20 lines
517 B
Ruby

require File.expand_path('../../libraries/pacemaker/resource/group',
File.dirname(__FILE__))
module Chef::RSpec
module Pacemaker
module Config
RESOURCE_GROUP = \
::Pacemaker::Resource::Group.new('group1')
RESOURCE_GROUP.members = ['resource1', 'resource2']
RESOURCE_GROUP.meta = [
[ "is-managed", "true" ]
]
RESOURCE_GROUP_DEFINITION = <<'EOF'.chomp
group group1 resource1 resource2 \
meta is-managed="true"
EOF
end
end
end