A cookbook is the fundamental unit of configuration and policy distribution in Chef.
Questions tagged [cookbook]
510 questions
0
votes
2 answers
do i need to include mod_aspnet45 and also install the windows_feature?
I'm writing a cookbook for a server I need to enable some windows features on.
Do i need to do BOTH of the following?
include_recipe iis::mod_aspnet45 and windows_feature 'IIS-ASPNET45' action :install or is only one or the other required?
the same…

Max Cascone
- 648
- 9
- 25
0
votes
1 answer
Chef Cookbook upload
I am trying to upload a specific cookbook from my local machine to my chef org but I am receiving the following error:
pwd: /c/Users/z068688/sharaj_repo/sensu_cookbooks/cookbooks
$ knife upload certs_tgt -c…

Sharaj Alva
- 3
- 1
0
votes
1 answer
berks doesn't resolve dependency from cookbooks
I am trying to have a git repository which manages my environment. I have set of lwrp written for specific tasks. These lwrps internally depends on many community cookbooks.
Each of my cookbook has a Berksfile where I specify dependency resolution.…

Arjun K R
- 427
- 1
- 6
- 25
0
votes
2 answers
CHEF- Having a hard time figuring out how SUDO COOKBOOK works
I was trying to add the %wheel group to the sudoers file via chef.
Unfortunately i'm having an hard time to figure out how this cookbook works. The readme doesn't sound very clear to me.
What i have done:
Added
depends 'sudo'
to the…

ToinoBiclas
- 262
- 4
- 13
0
votes
1 answer
ERROR: uninitialized constant #::ApplicationCookbook
Running chef-client with a set of cookbooks including compat_resource 12.10.4 as either a standalone or a dependency to another cookbook. I end up having a fatal error on chef-client run and see the following stacktrace.
Cookbook…

Davek804
- 2,804
- 4
- 26
- 55
0
votes
1 answer
Use Chef Cookbook Methods in Ruby script
is there a way to use Chef methods like "yum_package" in a ruby script, executed by standard ruby environment and not in a chef cookbook?
I try to install and remove yum packages in a ruby script and i was thinking about using the methods chef is…

Til
- 95
- 1
- 1
- 8
0
votes
1 answer
Learning Chef - Unable to Run Cookbook - Wrong Number of Arguments (1 for 0)
I've been following the tutorial at:
Building Your Chef Workstation on Windows
GitHub Repo of local
And it has been extremely helpful.
I've had to make a number of changes to get my code to the point where I should be able to execute the final…

Shinedog
- 1
- 2
0
votes
1 answer
Chef - How to run a cook book on a node
I have setup a chef server and nodes. Now I want to run my cook book on a specific node. Is there a way to run a custom made cook book on a node using chef-dk without bootstrapping?

lpsandaruwan
- 790
- 2
- 11
- 27
0
votes
1 answer
Pushing SQL Server logins via chef
I was wondering if it were possible to push a SQL Server login via a chef recipe, without going through something like PowerShell. We already push an RBAC file to maintain users on a DB on creation time, but I would like to be able to also push…

user3517454
- 217
- 2
- 11
0
votes
0 answers
Cookbooks are not being executed in order
I am trying to install resource before I execute my own recipe.
.kitchen.yaml:
run_list:
- recipe[ets_base_filesystems::default]
- recipe[nexpose::default]
- recipe[ets_nexpose_bootstrap::default]
Execution log:
Synchronizing Cookbooks:
…

Snehit Gajjar
- 38
- 1
- 6
0
votes
1 answer
Mule Cookbook Anypoint connector - build failed
pull this from this directory and perform a maven build
git clone https://github.com/mulesoft/mule-cookbook.git
The following is the error received towards the 2nd last step
[ERROR] Failed to execute goal…

blackray
- 13
- 4
0
votes
1 answer
Chef - print log at the end of statement if source isn't valid
this is my code:
if node['app']['source']
src = "#{node['app']['source']}\\#{node['app']['file_name']}"
else
src = "second_source"
end
I want to add a log.warn at the end of my statement in case of any source isn't valid,
something…

goldver
- 191
- 1
- 12
0
votes
1 answer
Assert that the Chef run included a recipe from another cookbook
$ cat Gemfile | grep "'chefspec'\|'chef'"
gem 'chef', '12.8.1'
gem 'chefspec', '4.6.1'
$ cat cookbooks/foo/recipes/default.rb | grep include
include_recipe 'bar'
$ cat cookbooks/foo/metafata.rb | grep depends
depends 'bar'
running chefspec…

Mr.
- 9,429
- 13
- 58
- 82
0
votes
1 answer
Chef git resource not sync even destination is not matched?
This is simple recipe for copy git repository.
git "/home/testuser" do
repository git_repo
revision 'master'
action :sync
end
git_repo is a variable which has path of git repository.
This works fine when run first time.
But if my repository is…

Vikas Saini
- 1,124
- 3
- 11
- 24
0
votes
1 answer
Unable to delete a Chef role with "." in its name
I had uploaded a wrong role (rrb_v10.0.0.1) by mistake to Chef Server.
knife role list
rrb_v10.0.0.1
rrb_v10
When I try to delete this role, I get the following error
knife role delete rrb_v10.0.0.1
ERROR: Chef::Exceptions::ValidationFailed: Option…

sourav de
- 5
- 3