Top "Chef-recipe" questions

Chef Infra (formerly just Chef) is a DevOps tool for scripting server configurations in Ruby (called cookbooks).

Overriding attributes in the recipe

Let's say I have a default attribute in a cookbook: default.nginx_upstreams = { 'service1' => ['service1.server.com'], 'service2…

chef-infra chef-recipe
Should I use include_recipe or add the recipe to run_list?

Trying to figure out the best approach for a large project. When is it appropriate to add recipes within a …

chef-infra recipe chef-recipe
How can I change a file with Chef?

I have 7 files and 1 war. I need to change values when I deploy them. I have this: ##usuario #alfresco.user=***** …

chef-infra chef-recipe
Node Name in Chef Template?

I've been trying to figure out how to get the node's name (knife bootstrap -N) into a template. I've tried …

chef-infra chef-recipe
Why can't chef resolve my cookbooks?

Intro I am learning Chef to automate the server management at work. I downloaded chefdk 3.0 from here and now I …

chef-infra chef-recipe berkshelf
How can you use a Chef recipe to set an environment variable?

How can you use a Chef recipe to set an environment variable? I need to set an environment variable using …

environment-variables chef-infra chef-recipe
What is the correct way to check for the existence of a nested attribute in Chef?

There are multiple ways to check for the existence of a nested attribute in chef, and I'm not sure which …

ruby chef-infra chef-recipe
How to lazily evaluate an arbitrary variable with Chef

I'm writing a Chef recipe to install our application code and execute it. The recipe needs to be particular about …

ruby variables chef-infra chef-recipe
How to query cookbook versions on a node?

Usage case: The DevOps team launched a node sometime ago, and my team would like to know what's the version(…

chef-infra chef-recipe knife cookbook
Need to refactor to the new Ruby 1.9 hash syntax

I have a recipe that has the following code that is failing a lint test: service 'apache' do supports :status =&…

ruby chef-recipe rubocop