Kitchen.yml with a role in run_list fails to converge


#1

Here is my kitchen.yml

---
driver:
  name: vagrant
  network:
    - ["private_network", {ip: "192.168.35.35"}]

provisioner:
  name: chef_zero
  # You may wish to disable always updating cookbooks in CI or other testing environments.
  # For example:
  #   always_update_cookbooks: <%= !ENV['CI'] %>
  always_update_cookbooks: true
  roles_path: roles/

verifier:
  name: inspec

platforms:
  - name: ubuntu-14.04

suites:
  - name: default
    run_list:
      - role[tomcat_role]
    verifier:
      inspec_tests:
        - test/smoke/default
    attributes:

and I keep getting the following error

    [2017-04-24T10:39:02+00:00] ERROR: Role tomcat_role (included by 'top lev
el') is in the runlist but does not exist. Skipping expand.

       =========================================================================
=======
       Error expanding the run_list:
       =========================================================================
=======

       Missing Role(s) in Run List:
       ----------------------------
       * tomcat_role included by 'top level'

Role is definitely there on chef server but still I am getting this error. Are we not allowed to use role in kitchen.yml’s run list attribute?


#2

I am facing the same issue. Did you ever find a resolution?


#3

This is likely because the roles_path key isn't set properly or the role objects (json) in the directory aren't working. In the future please don't resurrect old threads and open a new one with you details and versions.