title: Chef is running the wrong recipe
body: <p>I'm trying to set up Varnish in front of a Wordpress multi-site using Chef.  I am new to the system that was set up by others, and I'm a bit of a beginner in general.</p>
  
  <p>I have created a new recipe and added it to the run list, but when I run chef-client, it executes a different recipe in place of the one I wrote.  Specifically, it runs the only recipe that my recipe includes.</p>
  
  <p>Here is my recipe, which I copied almost verbatim from a pre-existing, working recipe that we use for a different site:</p>
  
  <pre><code>#
  # Cookbook Name:: web_varnish_config
  # Recipe:: wordpress
  #
  
  include_recipe 'web_varnish_config::default'
  
  all_wordpress_backends = search(:node, "chef_environment:#{node.chef_environment} AND roles:web_wordpress")
  all_wordpress_backends.sort_by!{ |n| n[:fqdn] } # Sort the nodes to prevent config-order thrashing.
  
  # Error state
  if all_wordpress_backends.empty?
    Chef::Log.warn("At least one node with recipes:web_wordpress must exist for chef_environment:#{node.chef_environment}. Skipping Varnish configuration.")
    return
  end
  
  template "/etc/varnish/default.vcl" do
    source "etc/varnish/wordpress.vcl.erb"
    mode "0644"
    variables(
      :all_wordpress_backends =&gt; all_wordpress_backends
    )
    notifies :restart, "service[varnish]", :delayed
  end
  
  # Use a share secret for our Varnish instances that is available to our Webservers
  # so that Wordpress can clear the Varnish cache.
  include_recipe 'chef-vault'
  settings = chef_vault_item_for_environment("web_wordpress", "varnish")
  if !settings.nil? and settings.key?('secret')
    file "/etc/varnish/secret" do
      content settings['secret']
      mode "0600"
      notifies :restart, "service[varnish]", :delayed
    end
  end
  </code></pre>
  
  <p>When I run chef-client, it runs web_varnish_config::default instead of this recipe, web_varnish_config::wordpress.  This is what my chef-client output looks like (tried to copy all of it, but couldn't so here's the beginning and the end, what I think is most relevant):</p>
  
  <pre><code>Starting Chef Client, version 13.6.4
  resolving cookbooks for run list: ["yum-epel::default", "serversetup-midd::cent7", "serversetup-midd::rootpassword", "midd_yum_cron::default", "fw-midd::default", "chef-client::config", "chef-client::default", "chef_client_updater::default", "centrify-midd::default", "centrify-midd::sshd", "midd_spacewalk::client", "commvault-midd::default", "serversetup-midd::webserver", "fw-midd::webserver", "centrify-midd::webserver", "chef-vault::default", "ssl-config-midd::miis", "ssl-config-midd::midd", "php-midd::default", "ssl-config-midd::wordpress", "web_php_config", "web_apache_config", "web_apache_config::ssl_context", "web_wordpress", "cookbook_versions::all", "ssl-config-midd::davisfellowsforpeace", "ssl-config-midd::davisprojectsforpeace", "ssl-config-midd::davisuwcscholars", "varnish-midd::default", "fw-midd::varnishserver", "web_varnish_config::backend", "web_varnish_config::wordpress"]
  Synchronizing Cookbooks:
    - smbfs (0.5.0)
    - compat_resource (12.19.0)
    - web_php_config (1.1.0)
    - ohai (5.1.0)
    - midd_spacewalk (0.4.3)
    - windows (3.0.5)
    - yum (5.0.1)
    - firewalld (1.1.5)
    - cookbook_versions (1.0.0)
    - serversetup-midd (2.6.10)
    - commvault-midd (2.3.1)
    - cron (4.1.3)
    - php-midd (2.0.6)
    - ssl-config-midd (2.2.1)
    - chef-vault (3.0.0)
    - logrotate (2.2.0)
    - selinux (2.0.3)
    - ssh_authorized_keys (0.4.0)
    - chef_client_updater (2.0.3)
    - web_wordpress (2.0.10)
    - varnish-midd (2.0.3)
    - chef-client (8.1.6)
    - users (5.1.0)
    - yum-epel (2.1.2)
    - web_apache_config (2.0.10)
    - web_varnish_config (2.3.2)
    - sshd (1.3.1)
    - fw-midd (3.2.5)
    - midd_yum_cron (1.0.0)
    - web_sshkeys (1.0.2)
    - web_git_tracking_branch (1.1.0)
    - centrify-midd (3.1.1)
  </code></pre>
  
  <p>And at the end:</p>
  
  <pre><code>Recipe: web_varnish_config::backend
     * cookbook_file[/var/www/html/check.html] action create (up to date)
     * web_apache_config_vhost[vhost-7-wwwhealthcheck.conf] action create
     * template[/etc/httpd/conf.d/vhost-7-wwwhealthcheck.conf] action create (up to date)
   (up to date)
   # NOTE: Below is where I'm expecting web_varnish_config:wordpress
   Recipe: web_varnish_config::default
     * service[varnish] action enable (up to date)
     * template[/etc/varnish/varnish.params] action create (up to date)
     * service[varnishncsa] action enable (up to date)
     * service[varnishncsa] action start (up to date)
     * cookbook_file[/etc/systemd/system/varnishncsa.service] action create (up to date)
  </code></pre>
  
  <p>If I take out the include line, chef-client skips this entirely, without errors.</p>
  
  <p>Any ideas?</p>