# Difference node.recipe? / node.recipes\[\].include?

**URL:** <https://discourse.chef.io/t/difference-node-recipe-node-recipes-include/2987>\
**Category:** Chef Infra (archive)\
**Created:** [July 8, 2012, 12:15pm UTC](https://discourse.chef.io/t/difference-node-recipe-node-recipes-include/2987 "2012-07-08T12:15:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenKing](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stephenking/32/656_2.png) [@StephenKing](https://discourse.chef.io/u/StephenKing)\
**Post date:** [July 8, 2012, 12:15pm UTC](https://discourse.chef.io/t/difference-node-recipe-node-recipes-include/2987/1 "2012-07-08T12:15:39Z")

</div>

Hi,

I’m a ruby newbie, so please forgive me, if my question is caused by just not knowing the language I use. But I’m not that confident 😉

node.recipe?(“recipe-name”) should return, whether a recipe is … what?

- included in the run list?
- included in the expanded run list?
- already seen in the current chef run?

It’s e.g. used in the chef-client::config recipe [1] to determine, whether it runs on a chef-server. However, it didn’t work for me, as chef-client recipe is prior to chef-server in the run list.

Using node[“recipes”].include? worked for me. So is this the expanded run list and would node.run\_state[:seen\_recipes].has\_key? equivalent to node.recipe?

If so, should I open a pull request for the chef-client recipe?

## Thanks! Steffen

[1] [https://github.com/opscode-cookbooks/chef-client/blob/master/recipes/config.rb#L40](https://github.com/opscode-cookbooks/chef-client/blob/master/recipes/config.rb#L40)
