A cookbook is the fundamental unit of configuration and policy distribution in Chef.
Questions tagged [cookbook]
510 questions
0
votes
1 answer
Chef Template Nested Loops
I have a small problem with my chef cookbook, i'm trying todo a nested loop (loop in loop). I have a array with multiple levels and i would like to loop all levels in a chef template. Right now i'm down at the following:
Template:
<%…

Thijs
- 3
- 4
0
votes
0 answers
How to copy a cookbook file depending on the action done before?
I want to install a Tomcat-Server onto a Windows node and then Copy a modified server.xml so the configuration is already done.
At this point, it is easily done with Chef and windows cookbook:
recipes/default.rb
windows_zipfile…

Bohne
- 4,029
- 1
- 16
- 22
0
votes
3 answers
How to add cookbooks from chef documentation
I am a new to chef cookbooks and currently working on a task. I have already completed the tutorial on chef.io but i am struggling to understand how can i install a cookbook provided at chef-io.
So as of now, I have downloaded the cookbook. Its…

Em Ae
- 8,167
- 27
- 95
- 162
0
votes
1 answer
4.2 Without cocoon, simple form or formtastic? Nested forms cookbook
I struggle with nested forms.
There're three classes Recipe, Quantity and Ingredient:
class Recipe < ActiveRecord::Base
belongs_to :user
has_many :quantities
has_many :ingredients, through: :quantities
accepts_nested_attributes_for…

Stef Hej
- 1,367
- 2
- 14
- 23
0
votes
0 answers
"vagrant up --provision" fails ("vagrant up" is fine)
I am trying to make incrementatal changes to the cookbook for a vagrant server. "vagrant destroy" followed by a "vagrant up" works perfectly but "vagrant up --provision" errors out as below. The files all appear to exist.
It seems weird that when…

paullb
- 4,293
- 6
- 37
- 65
0
votes
1 answer
Chef set attribute from library code/definition
Quick context: I want to write a recipe that changes dynamically based on the AWS region that an instance is in. I want to install the CodeDeploy agent which downloads from an S3 bucket based on the region of the instance. As such I need an…

yoshiwaan
- 479
- 4
- 11
0
votes
1 answer
Rails 4.2 Create ActiveRecord object with nested params
Does anybody know how to handle these attributes in the controllers new and create action?
(byebug) params
{"utf8"=>"V", "authenticity_token"=>"Wex9nnFigOviySzjfPN6zw==",
"recipe"=>{"name"=>"Cupcake"},
"name"=>{"ingredient_id"=>"2"},…

Stef Hej
- 1,367
- 2
- 14
- 23
0
votes
1 answer
Requiring a library in the attributes of a Chef cookbook
In my chef cookbook's attributes/default.rb I have the following:
default['dt'] = ActiveSupport::TimeZone.new('America/Chicago').local_to_utc(Time.now)
In my recipe/default.rb I have
chef_gem 'active_support/time'
Which if I understood correctly,…

Sam Hammamy
- 10,819
- 10
- 56
- 94
0
votes
1 answer
librarian-chef install shows getaddrinfo: Temporary failure in name resolution (SocketError)
I am installing cookbooks in VM Ubuntu environment using Vagrant. For cookbook management, I have used librarian-chef.
Vagrantfile
Vagrant.configure("2") do |config|
# instance identifier for future use
config.vm.box = "vanilaUbuntux64"
#…

Sumit Ramteke
- 1,487
- 1
- 16
- 39
0
votes
1 answer
What's wrong with my Chef Configuration?
Chef newb here - trying to setup a development box using vagrant to work with ruby on rails. I am digging through the docs, but can't seem to figure out the syntax around this error:
==> default: could not find recipe server for cookbook…

tlaffoon
- 65
- 2
- 10
0
votes
2 answers
cookbook not found on chef server
I am trying to upload cookbook on chef server I am using elasticsearch and written my wrapper cookbook my-elasticsearch
but I am getting following error :
iMac:chef-repo abc$ knife cookbook upload elasticsearch --cookbook-path cookbooks/
Uploading…

roy
- 6,344
- 24
- 92
- 174
0
votes
1 answer
override attributes in elasticsearch cookbook
I am trying to use "elasticsearch/cookbook-elasticsearch" cookbook for with my wrapper cookbook. I want to override following default attributes from cookbook-elasticsearch in my wrapper cookbook.
default.elasticsearch[:rpm_url] =…

roy
- 6,344
- 24
- 92
- 174
0
votes
1 answer
Add a full cookbook to a role in Chef web gui
When creating or editing a Role in the GUI I can't find a way to add a cookbook.
I have my recipes grouped in different cookbooks, but it seems when I create a role I have to add every recipe one by one. It does not make sense to me.
For instance, I…

Kalki70
- 1
0
votes
0 answers
PsExec not returning output
I have created a ruby script to open Powershell and run a module I have created in it, the following command is what I am using to do this;
cmd /c C:\\NaviMedix\\Shared\\Bin\\psexec -s C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe…

Michael O'Reilly
- 41
- 1
- 5
0
votes
0 answers
ActiveMQ cookbook triggers the activemq service, but the service is not started
Activemq service is triggered via cookbook but it does not runs:
activemq/attributes/default.rb
default['activemq']['version'] = '5.11.0'
src_filename="apache-activemq-#{node['activemq']['version']}-bin.tar.gz"
src_filepath =…

Shaik Sadiq Ahmed
- 173
- 1
- 4
- 18