Resolution: Cannot Reproduce
Affects Version/s: 0.9.14
Fix Version/s: None
Component/s: Chef Client
I've just spent a long time scratching my head, trying to understand this one. Not sure what I was thinking when I wrote cookbook2:
Note that I called 'require_recipe' instead of 'include_recipe'. This was a mistake. The effect of cookbook2 doing this is that cookbook1 is run twice, and any resources protected with an only_if are bypassed. Changing cookbook2 to the following, and cookbook1 worked as expected:
(I'm not sure if adding ::default makes a difference, but it makes the cookbook consistent with all of my other cookbooks)
While I realise that calling the wrong command will have strange effects, given that myself and other deveopers use several scripting lanuages everyday with subtle terminoligy differences, I doubt I am the only one above to have made this mistake. Is is possible to add any protection to stop the above happening if there is no concievable use case?