Questions tagged [cookbook]

A cookbook is the fundamental unit of configuration and policy distribution in Chef.

510 questions
0
votes
1 answer

How to automate mysql_secure_installation in Chef

Chef mysql recipe- in-order to setup a permanent password for root user in mysql, I did find a process which uses "bash" resource in recipe for running a bash script which automates all the steps which pop-up in the process. But after running the…
RahulK
  • 1
  • 1
  • 1
0
votes
1 answer

RESTful LWRP / Library for Chef

I need to be able to send REST calls and save the returning payload to variables within the cookbook (using chef solo). Calls are made in HTTPS Need to be able to get returning cookie header in order to login to API Is there such a community LWRP…
Eytan Avisror
  • 2,860
  • 19
  • 26
0
votes
1 answer

Template does not exists for cookbook elasticsearch

I am trying to write my first wrapper chef cookbook around elastic search and have run into a problem when running elasticsearch_configure and elasticsearch_service The error goes like this RuntimeError ------------ File…
0
votes
2 answers

unable to upload cookbook using knife command

in Windows,Unable to upload cookbook to hosted chef server. my Knife.rd file : # See http://docs.chef.io/config_rb_knife.html for more information on knife configuration options current_dir = File.dirname(__FILE__) log_level …
user2439278
  • 1,222
  • 7
  • 41
  • 75
0
votes
1 answer

windows_zipfile Chef resource failing due to 'rubyzip' gem file download

We are facing a situation, where end users Windows VM does not have internet connectivity, but only have access to file store. We are using windows_zipfile resource in one of our recipe. So cookbook execution failed in Windows cookbook, due to the…
Saravanan G
  • 581
  • 1
  • 9
  • 26
0
votes
1 answer

How to give root privileges to a normal user using chef cookbook

How to give root privileges to a normal user using chef cookbook. Hi, i have a user as tempuser and i want to give the user root privileges. Please let me know how it can be done using chef cookbook.
0
votes
1 answer

Error while unzipping file on AIX system using CHEF

I want to un zip / un tar a file on AIX system using CHEF. Steps i have done : 1.I have uploaded a zip file Test.zip on AIX system using Winscp. 2.Edited the default.rb using below command: execute "extract_Test_tar" do command "tar -xvf…
0
votes
2 answers

Chef Best Practice Loop same recipe

Can anyone suggest in chef a best way to handle looping and running a certain recipe. For example I have this in my recipe apps_databag = search("aws_opsworks_app") apps_databag.each do |app_settings| case app_settings['app_source']['type'] when…
Drixson Oseña
  • 3,631
  • 3
  • 23
  • 36
0
votes
1 answer

Chef: Error executing action `run` on resource 'redisio_configure[redis-servers]'

I got the following error during installation Redis by Chef using recipe redisio. Could you help me find a reason Recipe: redisio::configure * redisio_configure[redis-servers] action run …
0
votes
1 answer

How to forward port in apache2 cookbook

I tried with below code in apache cookbook to map default port 80 to 443 however still I get error while running the chef. Can you please suggest on this. I tried to map to other than port # 80 since I have nginx recipe also in my cookbook so would…
raj
  • 137
  • 1
  • 1
  • 10
0
votes
1 answer

Using the "httpd" Chef cookbook's "httpd_config" resource results in "undefined local variable or method" error

Using the httpd cookbook I try to pass a variable to an underlying template resource via the httpd_config attribute's variables parameter. This results in a fatal error. What do I miss here? I am using: Ubuntu 14.04 (system to be provisioned) Chef…
mostwanted
  • 1,549
  • 3
  • 13
  • 21
0
votes
2 answers

How to enable logging in chef at each step in the cookbook

I have a cookbook that performs some installation on the target node. I want to log the output of chef client run in /var/log/. I want to embed certain code in the recipe that logs the output. java "java home" do java_source "https://url …
user3086014
  • 4,241
  • 5
  • 27
  • 56
0
votes
1 answer

How do I bootstrap a node into chef server with "non root & non sudo" user?

I have a node(VM) with a non-root user which does not have sudo permissions too. It will not be able to bootstrap the node since the non root non sudo user will have no access to /etc where the chef-client configuration files and cache reside. Is it…
Vinay Kadalagi
  • 1,315
  • 1
  • 8
  • 11
0
votes
2 answers

Modify configuration files with Chef

I am writing a cookbook to install and configure an application. From what I googled, the best way to modify configuration, is to put a template of that config file. But an app can have different versions and config files may vary. What is the best…
Igor Zilberman
  • 1,048
  • 1
  • 11
  • 16
0
votes
1 answer

undefined method `default' for Chef::Resource::Template

I have created a template in chef, sending the value from attributes and recipes but getting error : [2015-12-09T08:09:19-05:00] ERROR: Running exception handlers [2015-12-09T08:09:19-05:00] ERROR: Exception handlers…
user3086014
  • 4,241
  • 5
  • 27
  • 56