【问题标题】:kitchen converge on chef_roles using chef_zero doesn't expand run_list厨房使用 chef_zero 收敛于 chef_roles 不会扩展 run_list
【发布时间】:2016-05-26 04:03:54
【问题描述】:

问题: 我试图使用 chef_zero 来测试以 ruby​​ DSL 格式指定的食谱角色,但是当我尝试做 kitchen converge 时。看起来它无法扩展中指定的角色 kitchen.yml.

如何解决:是否无法使用 chef-zero 来使用 test-kitchen 测试食谱中的角色,或者我在 kitchen.yml 中没有正确调用该角色。如何在本地使用 chef_zero 测试角色。

**chef-environment**:

Chef Development Kit Version: 0.12.0
chef-client version: 12.8.1
berks version: 4.3.0
kitchen version: 1.6.0

**kitchen.yml**:

suites:
  - name: default
    run_list:
      - role[test_role]

 **Error**

 [2016-05-25T12:58:37-04:00] ERROR: Role test_role (included by 'top level') is in the runlist but does not exist. Skipping expand.

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

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

   Original Run List
   -----------------
   * role[test_role]

chef-stacktrace.out

Chef::Exceptions::MissingRole:扩展的运行列表包括不存在的角色:test_role

【问题讨论】:

    标签: chef-infra test-kitchen chef-zero


    【解决方案1】:

    直到 12.10(最新版本)之前,ChefFS(因此为零、本地模式、独奏等)不支持 Ruby 格式的文件。您需要为旧版 Chef 使用 JSON 格式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-20
      • 2017-05-05
      • 2015-10-29
      • 2016-08-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多