代码之家  ›  专栏  ›  技术社区  ›  Soumyajit Ray

解析runlist的Cookbooks时出错:缺少Cookbooks:没有此类Cookbooks

  •  2
  • Soumyajit Ray  · 技术社区  · 7 年前

    我也试着运行另一个cookbook工作站,但也出现了同样的错误

    请帮忙。让我知道我做错了什么。

    [vagrant@localhost ~]$ tree
    .
    ├── cookbooks
    │   ├── apache
    │   │   ├── Berksfile
    │   │   ├── chefignore
    │   │   ├── metadata.rb
    │   │   ├── README.md
    │   │   ├── recipes
    │   │   │   ├── default.rb
    │   │   │   └── server.rb
    │   │   ├── spec
    │   │   │   ├── spec_helper.rb
    │   │   │   └── unit
    │   │   │       └── recipes
    │   │   │           └── default_spec.rb
    │   │   └── test
    │   │       └── recipes
    │   │           └── default_test.rb
    │   └── workstation
    │       ├── Berksfile
    │       ├── chefignore
    │       ├── metadata.rb
    │       ├── README.md
    │       ├── recipes
    │       │   ├── default.rb
    │       │   └── setup.rb
    │       ├── spec
    │       │   ├── spec_helper.rb
    │       │   └── unit
    │       │       └── recipes
    │       │           └── default_spec.rb
    │       └── test
    │           └── recipes
    │               └── default_test.rb
    ├── generate
    ├── hello.rb
    ├── help
    │   ├── Berksfile
    │   ├── chefignore
    │   ├── metadata.rb
    │   ├── README.md
    │   ├── recipes
    │   │   └── default.rb
    │   ├── spec
    │   │   ├── spec_helper.rb
    │   │   └── unit
    │   │       └── recipes
    │   │           └── default_spec.rb
    │   └── test
    │       └── recipes
    │           └── default_test.rb
    └── nodes
        └── localhost.json
    
    24 directories, 28 files
    [vagrant@localhost ~]$ sudo chef-client -z --runlist “apache::server”
    [2017-08-08T13:16:05+00:00] WARN: No config file found or specified on command line, using command line options.
    Starting Chef Client, version 12.14.89
    resolving cookbooks for run list: ["“apache::server”"]
    
    ================================================================================
    Error Resolving Cookbooks for Run List:
    ================================================================================
    
    Missing Cookbooks:
    ------------------
    No such cookbook: “apache
    
    Expanded Run List:
    ------------------
    * “apache::server”
    
    Platform:
    ---------
    x86_64-linux
    
    
    Running handlers:
    [2017-08-08T13:16:07+00:00] ERROR: Running exception handlers
    Running handlers complete
    [2017-08-08T13:16:07+00:00] ERROR: Exception handlers complete
    Chef Client failed. 0 resources updated in 01 seconds
    [2017-08-08T13:16:07+00:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
    [2017-08-08T13:16:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    [2017-08-08T13:16:07+00:00] ERROR: 412 "Precondition Failed"
    [2017-08-08T13:16:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
    [vagrant@localhost ~]$
    
    2 回复  |  直到 7 年前
        1
  •  2
  •   StephenKing    7 年前

    正在解析运行列表的cookbooks:[“apache::server”]

    $ sudo chef-client -z --runlist "apache::server"
    
        2
  •  0
  •   joy    7 年前

    尝试使用

    chef-client -z -o apache