chef-recipe Questions

2

knife node show my_chef_node will give you information like the recipes, roles, etc. but ideally what I want is to be able to see the version of those cookbook recipes as well. knife search node ...
Dorise asked 23/6, 2015 at 20:22

10

Solved

Usage case: The DevOps team launched a node sometime ago, and my team would like to know what's the version(s) of one/several cookbook(s) being used in the run_list. Our DevOps team is firefightin...
Schaal asked 22/6, 2015 at 18:51

2

Solved

New to chef recipe and google is not showing me an example of what I need to do. I have a file that I want deleted when chef finds it exists. I am not finding any google examples of something lik...
Fizzle asked 25/1, 2016 at 20:31

4

Solved

I'm using a Chef hosted server, a workstation and nodes and have run cookbooks on the nodes to install Java, update hosts file. I'm not able to find a reference in sites to unzip tar files. Could y...
Istic asked 10/2, 2015 at 21:15

4

Solved

Intro I am learning Chef to automate the server management at work. I downloaded chefdk 3.0 from here and now I am trying to build my first cookbook using chef. Important I am using this in a Wind...
Daydream asked 15/10, 2014 at 21:50

4

I have 7 files and 1 war. I need to change values when I deploy them. I have this: ##usuario #alfresco.user=***** alfresco.user=******** ##pass #alfresco.password= sfsfs alfresco.password=sfgsf ...
Puerilism asked 13/2, 2013 at 6:58

5

Solved

There are multiple ways to check for the existence of a nested attribute in chef, and I'm not sure which is correct/best, and if any will result in empty attributes being stored on the node: nod...
Sensibility asked 24/9, 2013 at 15:39

5

Solved

How can you use a Chef recipe to set an environment variable? I need to set an environment variable using a Chef recipe. Can you provide an example of how to accomplish this?
Loving asked 8/6, 2011 at 20:1

5

Solved

I'm trying to create a Chef recipe to append multiple lines (20-30) to a specific config file. I'm aware the recommended pattern is to change entire config files rather than just appending to a f...
Marvelmarvella asked 2/6, 2013 at 3:22

2

Solved

Hi I am creating a WCS instance, for which i have to execute the create instance command using the wcs user (webadmin), its failing to connect to DB as its not able to get the required env variable...
Positronium asked 12/7, 2013 at 11:55

4

Solved

I have created a user 'testuser' by using chef. How to make this user as sudo user?
Paroicous asked 7/2, 2017 at 15:22

2

I am trying to bootstrap an server. I used to use "recipe[poise-python]" to pip install packages. Now I get the below error. How do fix? * python_package[setuptools] action upgrade ============...
Octavie asked 17/4, 2018 at 1:54

2

Solved

I'm adapting Apache cookbook to work with 2.4 Apache. Opscode cookbook is currently failing because it's generating conf file with LockFile keyword that is excluded from the list of the Apache 2.4 ...
Your asked 4/3, 2014 at 17:45

4

Solved

I would like to test/debug cookbooks. However, using chef-client to restart a chef run, this requires me to modify cookbooks, upload them to the chef server & synchronize cookbooks. I would li...
Leveille asked 24/3, 2015 at 19:22

2

Solved

I have a recipe that has the following code that is failing a lint test: service 'apache' do supports :status => true, :restart => true, :reload => true end It fails with the err...
Eisler asked 16/5, 2017 at 15:17

2

Solved

knife search node '*:*' -a recipes gives me all the nodes and their recipes. knife node show NODE_ID -a recipes gives me recipes used by a specific node with NODE_ID. I need to fetch the cont...
Scrape asked 15/2, 2017 at 19:39

2

Solved

I have a bash script in Chef that fetches the time through NTP protocol from 3 instances running NTP server. The code at present is if not node.run_list.roles.include?("ntp_server") bash "ntpdate...
Didi asked 1/11, 2016 at 11:9

3

Solved

I have a recipe that sets a variable inside a ruby_block and needs to use that variable as an input attribute for a recipe. How can I use the include_recipe after the ruby_block has been executed? ...
Magnitude asked 3/3, 2015 at 19:24

1

Solved

I have cookbook base and cookbook myapp base has 2 recipes - my_java and java_with_custom_stuff in java_with_custom_stuff I want to use the recipe for my_java (same cookbook). something like inc...
Affiance asked 10/8, 2016 at 10:32

2

Solved

I just started using Chef and I'm trying to figure out how to first check if a file exists before doing anything. I have the file part down for my current use case, where I'm removing a login fil...
Vena asked 7/7, 2016 at 23:27

2

Solved

In a cookbook I have a library(client_helper.rb). A module is defined inside it. Module name is Client_helper. Here is the module code. module Client_helper # This module contains helper methods ...
Marko asked 25/5, 2016 at 10:36

3

Solved

I'm writing a Chef recipe to install our application code and execute it. The recipe needs to be particular about the directory this code ends up in (for running templates, setting log forwarding e...
Escalate asked 16/12, 2013 at 20:55

3

Solved

I have the following code which downloads a file and then reads the contents of the file into a variable. Using that variable, it executes a command. This recipe will not converge because /root/foo...
Cornie asked 26/2, 2016 at 17:36

3

Solved

Let's say I have a default attribute in a cookbook: default.nginx_upstreams = { 'service1' => ['service1.server.com'], 'service2' => ['service2.server.com'], } Then it gets modified and ...
Impressment asked 31/1, 2013 at 5:19

1

Solved

I have a recipe which deletes an empty logs directory, then replaces it with a symlink in the next step. directory "#{ENV['GS_HOME']}/logs/" do action :delete only_if { ::Dir.exists?("#{ENV['GS...
Divergence asked 28/8, 2015 at 16:30

© 2022 - 2024 — McMap. All rights reserved.