我发现有2种方法可以生成厨师回购,并且会被它们的相似性混淆.我想知道哪一个是推荐的方式,以及为什么厨师提供这些命令.也许他们在不同的背景下使用?
$ chef generate app chef-app
$ chef generate repo chef-repo
$ diff chef-app chef-repo | colordiff
Only in chef-app: .git
diff chef-app/.gitignore chef-repo/.gitignore
1,8c1
< .vagrant
< Berksfile.lock
< *~
< *#
< .#*
< \#*#
< .*.sw[a-z]
< *.un~
---
> .rake_test_cache
10,16c3,7
< # Bundler
< Gemfile.lock
< bin/*
< .bundle/*
<
< .kitchen/
< .kitchen.local.yml
---
> ###
> # Ignore Chef key files and secrets
> ###
> .chef/*.pem
> .chef/encrypted_data_bag_secret
Only in chef-app: .kitchen.yml …
Run Code Online (Sandbox Code Playgroud) 我已经安装了厨师客户端12.0.3
,除此之外我已经安装了chef-dk版本,0.3.5
但为什么chef-dk正在安装厨师客户端版本Chef: 11.18.0.rc.1
错误:
E, [2015-01-08T04:58:36.707534 #22533] ERROR -- : Ridley::Errors::ClientError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
E, [2015-01-08T04:58:36.708931 #22533] ERROR -- : /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/responses.rb:29:in `value'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/cell_proxy.rb:17:in `_send_
There was an error connecting to the Chef Server
Run Code Online (Sandbox Code Playgroud) 不确定我将如何使用数组在厨师中创建 Sales 文件夹的多个子文件夹。
sales = 'Sales'
salesfolders = %w{'NewClients', 'MarketingMaterial', 'SalesTools', 'ClientInformation'}
directory "#{directory}\\#{salesfolders}"
owner 'root'
group 'root'
mode '0755'
recursive true
action :create
end '
Run Code Online (Sandbox Code Playgroud)
}