A cookbook is the fundamental unit of configuration and policy distribution in Chef.
Questions tagged [cookbook]
510 questions
0
votes
1 answer
how to use a 'not_if' condition on a template resource
I'm trying to use a 'not_if' condition in a template resource as showcased by docs.chef.io
template "/tmp/somefile" do
mode '0644'
source "somefile.erb"
not_if { node[:some_value] }
end
I'm new to chef and I'm unsure how to proceed to create…

david
- 741
- 3
- 10
- 29
0
votes
1 answer
is it possible to edit the same line twice in the same ruby_block using 2 calls to FileEdit? [Chef]
Hi this is what I'm trying to do:
ruby_block "modify line" do
block do
file= Chef::Util::FileEdit.new("/someExistingFile.txt")
file.insert_line_if_no_match(/^11$/, "#this is a comment\n#11")
file.search_file_replace_line(/^#11$/,…

david
- 741
- 3
- 10
- 29
0
votes
1 answer
passenger_apache2 cookbook fails
I attempting to deploy a number of cookbooks to configure Apache2 and Passenger on Ubuntu 14.04. Below is the list of cookbooks I am installing in the order in which they appear in the run_list:
build-essential 2.1.3,
apt 2.6.1,
iptables…

acoustic_north
- 815
- 11
- 31
0
votes
1 answer
mysql Chef cookbook ignores my initial root password
I am trying to create a cookbook wrapper to deploy MySQL with Chef, but it seems that it does not insert the initial root password that I am setting in my cookbook.
mysql_client 'default' do
version '5.6'
action :create
end
if…

Enrique Cordero
- 33
- 1
- 1
- 6
0
votes
2 answers
Unable to set jdoconfig.xml and appname.properties templates for the war file deployed in tomcat7/webapps
Recipe:
include_recipe "lgjava"
include_recipe "lgtomcat"
remote_file "/usr/local/tomcat7/webapps/web.war" do #this file places web.war in the specified path
source "http://path/to/web.war"
action :create_if_missing
end
template…

Shaik Sadiq Ahmed
- 173
- 1
- 4
- 18
0
votes
2 answers
Chef - Visual Studio 2013 cookbook
Where can I find chef cookbook to install visual studio 2013. The chef-supermarket provides cookbook for visual studio 2012. Can it be modified to work with visual studio 2013

user27111987
- 995
- 2
- 10
- 26
0
votes
1 answer
Chef::Exceptions::Exec: /bin/systemctl start nginx returned 1, expected 0
I am trying to install nginx on CentOs machine using yum cookbook as dependancy.
This is what my nginx/recipe/default.rb looks like,
#
# Cookbook Name:: nginxl
# Recipe:: default
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not…

Shaik Sadiq Ahmed
- 173
- 1
- 4
- 18
0
votes
1 answer
Using files with wrapper cookbook and recipes defined in parent cookbook
My chef run recently throws this error:
Chef Client failed. 22 resources updated in 90.306407696 seconds
[2014-12-19T19:47:24+00:00] ERROR: cookbook_file[/srv/mycookbook/static/a.png] (mycookbook::_deploy line 82) had an error:…

samxiao
- 2,587
- 5
- 38
- 59
0
votes
2 answers
How to update a cookbook that has been added to the Chef Supermarket?
One of my colleagues added the Sumo Logic collector cookbook and made me collaborator. I have since made updates to the source on Github but can't find any documentation or any options or buttons in the Supermarket to update the cookbook from…

Yoway Buorn
- 11
0
votes
1 answer
Error executing action install on resource package[nginx]
I am trying to install nginx on ec2 server using yum cookbook as dependancy.
This is what my nginx/recipe/default.rb looks like,
include_recipe "yum"
package "nginx" do
version "1.6.2"
action :install
end
template "nginx.conf" do
source…

Shaik Sadiq Ahmed
- 173
- 1
- 4
- 18
0
votes
1 answer
How configure cookbook maven in chef node?
The source for question can be easy found this question. So I run knife cookbook site install maven and then knife cookbook upload myCookbook --include-dependencie
But after run
knife bootstrap 192.168.1.37 --ssh-user root --ssh-password '123456'…

Cherry
- 31,309
- 66
- 224
- 364
0
votes
2 answers
assets precompiling issues with chef recipe
I am encountering issue with assets pre-compiling through chef recipe .
my recipe block contains
execute "rake assets:precompile" do
cwd current_release_directory
command "bundle exec rake assets:precompile --trace"
environment…

mbdvg
- 2,614
- 3
- 21
- 39
0
votes
1 answer
Custom cook book to deploy java app on tomcat using AWS CLoudFormation template
i am trying to deploy a java webapp/tomcat using AWS opsworks, but i am not finding any cookbooks which configures tomcat on ec2 and then deploy my java app. can someone please provide me with the custom cookbook for that.
I need both the link to…

Subham Tripathi
- 2,683
- 6
- 41
- 70
0
votes
1 answer
Chef IIS Cookbook thirty_two_bit option not working
I have a resource block to create an app pool, make thirty_two_bit option as true and assign an username and password.
iis_pool 'CPool' do
runtime_version "2.0"
pipeline_mode :"Classic"
recycle_after_time "0"
thirty_two_bit true
pool_username…

Eben
- 1
- 1
0
votes
1 answer
Vagrant Provision AWS Issue
I am following the Rails App Cookbook and am facing issue with step 6 which involves provisioning an AWS instance. I received the following errors as output.
As explained in the guide, upon observing the provisioning failure, I executed vagrant up…

fr_muses
- 1,475
- 2
- 10
- 10