【发布时间】:2018-02-10 02:20:03
【问题描述】:
我正在尝试整合我在 CentOS 7 上创建的厨房实例,并且在配方中只有一行来安装 nginx 包。
# Cookbook:: vmaas
# Recipe:: default
#
# Copyright:: 2018, The Authors, All Rights Reserved.
package "nginx"
但是收敛失败,错误如下:
在资源 'yum_package[nginx]' 上执行操作
install时出错 ==================================================== =======================Chef::Exceptions::Package ------------------------- No candidate version available for nginx资源声明:
--------------------- # In /tmp/kitchen/cache/cookbooks/vmaas/recipes/default.rb 6: package "nginx" Compiled Resource: ------------------ # Declared in /tmp/kitchen/cache/cookbooks/vmaas/recipes/default.rb:6:in `from_file'
.kitchen.yml 如下所示:
---
driver:
name: vagrant
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'] %>
chef_omnibus_url: http://www.chef.io/chef/install.sh
require_chef_omnibus: 12.7.2
always_update_cookbooks: false
transport:
user: vagrant
#always_update_cookbooks: true
verifier:
name: inspec
platforms:
- name: centos
driver:
box: target/centos7
#box_check_update: true
box_url: 'https://binrepo.target.com/artifactory/marketing/boxes/centos7.json'
suites:
- name: default
run_list:
- recipe[vmaas::default]
verifier:
inspec_tests:
- test/smoke/default
attributes:
如果我能得到一些相同的指导,那就太好了。
问候, 苏尼尔
【问题讨论】:
-
不是应该显式启用的 EPEL 的 nginx 部分吗?