Unique Resources

is there a need for unique naming of Resources over Cookbooks?

I have Cookbook 1 with
execute “abc” do
command "a"
end

and Cookbook 2 with
execute “abc” do
command "b"
end

a node with runlist 1 and 2
but when abc from 2 is executed the command is a not b

i am using chef-0.10.6

thx a lot
Christian

On Thu, Feb 23, 2012 at 3:31 PM, Grundmann, Christian
Christian.Grundmann@fabasoft.com wrote:

is there a need for unique naming of Resources over Cookbooks?

I have Cookbook 1 with

execute “abc” do

command “a”

end

and Cookbook 2 with

execute “abc” do

command “b”

end

a node with runlist 1 and 2

but when abc from 2 is executed the command is a not b

The resource name is its unique identifier; if you have execute “abc”
in two different cookbooks, it will still be interpreted as the same
resource. This is a feature, not a bug :slight_smile:

If you need both commands to be run in a chef run, make sure their
names are different.