Search code examples
chef-infrachef-solotest-kitchen

Missing roles in run list, Chef kitchen chef_solo


When running kitchen converge I get the follow error:

================================================================================  
Error expanding the run_list:
================================================================================  
Missing Role(s) in Run List:

What do I need to do so that the test kitchen run can find the role? I'm running from the chef-repo/ directory that contains the roles/ directory.

kitchen.yml file contents

---
driver:
  name: vagrant

provisioner:
  name: chef_solo
  roles_path: ./roles

platforms:
  - name: centos-7.1

suites:
  - name: default
    run_list: role['role-name']
    attributes:

Solution

  • You need to configure the roles path on the provisioner to use roles with Kitchen, and this is generally not recommended as it is kind of against the point.