Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

Bootstrap chef issues

I have a strange issue when trying to bootstrap nodes and upload new cookbook versions at Ubuntu. We had an old chef server which run in RHEL, but the different between the two operations is now new ...
Aviel Amitay's user avatar
0 votes
1 answer
93 views

Chef Recipe: iis_pool periodic_restart_schedule getting set to empty array

I am currently working on a Chef recipe where I set up an IIS application pool with a specific service account identity. However, I've observed that the periodic_restart_schedule property is being set ...
Sidhartha's user avatar
  • 1,080
1 vote
1 answer
31 views

How to resolve error with 7zip not getting installed using chef-client version 14.6.47

I am getting below error Recipe: 7zip::default[0m amazon-ebs: * windows_zipfile[c:/dirname/] action unzip amazon-ebs: [0m amazon-ebs: =========================================================...
Santosh Garole's user avatar
0 votes
2 answers
76 views

chef : enable service based on a "grep" result

I had a first question, but apparently, I was doing things in the wrong way, so trying this new approach. I'm creating a systemd service file to run multiple instances of the service : if ( (node[:...
Burps's user avatar
  • 174
0 votes
0 answers
87 views

Mosaic Plot similar to R Cookbook

I want to create a mosaic plot like the one below from the R cookbook, but I cannot get it to plot the third dimension or format properly. Mosaic Plot from R Cookbook - what I am aiming for I ...
fish_out_of_water's user avatar
0 votes
0 answers
580 views

Error executing action `install` on resource 'dnf_package[httpd]' in Chef

I am trying to install APACHE server from CHEF. Encounter below error. OS - Amazon Linux Recipe :- package 'httpd' do action :install end file '/var/www/html/index.html' do content "...
Debayan new's user avatar
0 votes
2 answers
94 views

Word find with Ruby regex

I can't find a word in line with the line started special word. For example; Mike likes banana, kiwi and grapes. Mary likes banana, apple and watermelon. I made a mistake in Mary's favorite fruit. I ...
Hasan's user avatar
  • 175
0 votes
2 answers
168 views

Chef cookbook - how to fetch hostname dynamically in the attribute file

I need to create 10 tomcat instances on 5 different servers (2 instances on each server). The instances names are common across the 5 servers. The Tomcat instances would need to be integrated with a ...
Tejas's user avatar
  • 1
0 votes
1 answer
102 views

undefined method `chef_gem' for #<Chef::Node::Attribute:0x000055cb839ecd58>

so i'm trying to extract some values from vault in my attributes file. And the first few lines of code are the following: chef_gem 'vault' do compile_time true end require 'vault' Vault....
kareem_maaddawy's user avatar
0 votes
1 answer
227 views

How to Test Cookbook in CHEF using DOCKER

I am trying to test a simple cookbook recipe using docker driver. But, I get an error. Can someone please help? I really gave my all effort trying several things but none of them worked. I had ...
Robin Raj's user avatar
0 votes
0 answers
410 views

Unbelievable! chef-client always stick to an old version of dependence cookbook regardless of a newer one on chef server

The problem is like this: I have two common cookbook, named common1, common2, they have multiple versions. $ knife cookbook show common1 common1 1.0.1 1.0.0 $ knife cookbook show common2 common2 ...
osexp2000's user avatar
  • 3,135
1 vote
3 answers
178 views

AudioKit Cookbook v.5 build fails (xcode 13.2.1)

I have been trying to build, to no avail, the Cookbook under Xcode 13.2.1. I get "Analyze Failed" with the following errors: Stk: Command CompileSwiftSources failed with a nonzero exit code ...
Torrontés's user avatar
0 votes
1 answer
332 views

How to edit a template file dynamically during a chef run

I have a template file in my chef cookbook named 'Test Template', In my Chef recipe I am sourcing and updating my template file to a file '/etc/run/mn.txt' as follows: template 'Test Template' do ...
airzinger1's user avatar
0 votes
1 answer
193 views

How can you use a Chef recipe to set an environment variable by reading from Shell script?

I need to read the credentials from Shell script and set it as environmental variable. Previous code in chef ENV['password'] = '123' Now I'm trying to use below code but it is not working. bash '...
RAJ 's user avatar
  • 17
0 votes
0 answers
51 views

Cookbook in runlist does not see overriden value of attribute

I have several cookbooks in a runlist 'wrapper' cookbook. On one of the coobooks, I override the value of a node attribute, and then I restore it back after I do run some methods. When the next ...
Mirsa's user avatar
  • 1
2 votes
0 answers
398 views

Setting up hashicorp vault in production with chef docker resource

I am trying to setup hashicorp vault in production with chef cookbook. This is what I have in my recipes/default.rb directory '/vault-docker' do action :create end cookbook_file '/vault-docker/...
Hakeem Baba's user avatar
1 vote
1 answer
138 views

Chef - Source a Script

I am having issues installing Ruby 2.1 using rbenv and Chef. I thought I would use RVM. When installing RVM we need to source a script if we are going to use it immediately. source /path/to/rvm/script ...
Ziyan Junaideen's user avatar
1 vote
2 answers
1k views

Error Resolving Cookbooks for runlist: missing cookbooks: No such Cookbook 'docker'

I am trying to run this Berksfile: source 'https://supermarket.chef.io' metadata metadata.rb: name 'my_jenkins_cookbook' depends 'git' depends 'ruby_rbenv' depends 'jenkins' depends 'java' depends '...
Snigda's user avatar
  • 11
1 vote
1 answer
1k views

Poise cookbook failing with compilation error

I am getting compile error on poise cookbook . i started to get this error starting yesterday. was there any change done recently ? or do we have fix for this ?? ======================================...
mebb's user avatar
  • 143
1 vote
2 answers
781 views

Chef use cookbook_file in ruby block

I have the following code to figure out where Java is located on the box. Java comes with our application and what Java version that is included with the application differs. def app_java_home if ...
Fransurbo's user avatar
  • 465
1 vote
1 answer
193 views

Chef::Exceptions::nginx didn't start when installing nginx-1.16.1 from source

I am trying to install nginx from source , My requirement is to install specific version of nginx i.e., 1.16.1 because of which i am downloading from source. After running installNginx.rb , i see ...
Surekha Reddy's user avatar
-1 votes
1 answer
78 views

Chef Cookbook Recipe action to agree end user License agreement and automate an Installation process

I am a newbie to chef, need some inputs on writing a recipe for allowing the actions that needs user input like "Press 1 to continue", "2 to quit", "3 to redisplay" else ...
user2083200's user avatar
1 vote
1 answer
48 views

How to tag multiple resources reading lazily them from an attribute?

I want to tag multiple AWS Instances, the instance-ID for them is stored in an attribute, e.g. - aws |_ instances |____ 0: i-12sdfddf |____ 1: i-23fdgfdg |____ 2: ...
ashishrana.cse's user avatar
0 votes
1 answer
283 views

HowTo install custom nodejs version (14.2.0) on AWS Opsworks Chef 11/12 stack

I have a nodejs express app that makes use of some ES6 features, so it needs nodejs way above 0.12.18. But the AWS Opsworks Chef 11 stack only offers NodeJs up to 0.12.18. I tried using my own custom ...
spaxxUnited's user avatar
1 vote
1 answer
119 views

Source for package SQLServer2012SP4KB4018073x64ENU.exe does not exist in chef

i am trying to install sql server 2012 using chef to a virtual box.. Below is the code that i use but i am getting source does not exist error. Below is the server.rb code that i have.. package ...
Finny Thomas's user avatar
0 votes
2 answers
93 views

AudioKit v5 freeze after use Microphone, also in the cookbook

It also happen cookbook: start Tuner then switch to DrumSequencer after few time when switch quickly, the app freeze. The App freeze happen after call engine.stop() any idea what can solve this issue?
gilgul's user avatar
  • 51
-1 votes
2 answers
140 views

Understanding chef cookbook snippet

I am not able to interpret the below code in Chef cookbook: systemd_unit '<service_name>' do action %i[enable start] end I read about systemd_unit from systemd_unit resource. However, ...
iDev's user avatar
  • 2,383
0 votes
1 answer
138 views

Unable to set environment variables using Chef tomcat

I am using a cookbook from https://supermarket.chef.io/cookbooks/tomcat instance_name = node['tomcat']['name'] # Install the Tomcat Service tomcat_install instance_name do version node['tomcat']['...
proximator's user avatar
1 vote
2 answers
3k views

how to use node.attribute to check if node attribute exist or not?

want to check if chef attribute is declared or not in recipe, but it seems not working as expected, can anyone tell me how i can do it properly using "node.attribute?" here is scenario there ...
nitinmaru's user avatar
0 votes
2 answers
61 views

cookbook : propagate list from node to fill template values

I have a list of veriables in node file in cookbook as "normal": { "Data_list": 'one, two, three, four', "tags": [ ] } based on this list i want to add ...
nitinmaru's user avatar
0 votes
2 answers
537 views

How to set http_proxy for chef remote_file resource

I am looking for help where I need to download binaries from chef-cookbook from https url and I can not make a direct call to the url from client server. I am able to download it using curl but after ...
krishnanshu tyagi's user avatar
0 votes
1 answer
594 views

Chef - Read out node attribute and store it in another node attribute in same chef client run fails

I try to read out the current recipe name while chef-client run and to store it in a variable or node attribute wihtin an recipe. Until yet i just found a way storing it into a node attribute but it ...
Pegasus1985's user avatar
0 votes
1 answer
133 views

Chef::Exceptions::FileNotFound: template[/var/www/html/index.html]

I am new to the chef I could not understand what is an issue. Following is my default script apt_update 'Update the apt cache daily' do frequency 86_400 action :periodic end package 'apache2' ...
user avatar
1 vote
1 answer
687 views

cannot run my cookbook on chef workstation

while running chef-client --local-mode --override-runlist first_cookbook I am getting following error [2020-04-07T16:31:06+05:30] WARN: No config file found or specified on command line. Using ...
user avatar
0 votes
1 answer
228 views

how to find the author who uploaded cookbook to chef server?

how to find the author who uploaded the cookbook to the chef server? Also how to find out the versions mapping to the author of the cookbook upload in chef-server?
Murthy's user avatar
  • 322
1 vote
2 answers
1k views

Chef Recipe: File not found issue (does not contain a file at any of these locations)

I'm trying to bootstrap a machine with a recipe that contains a call to cookbook_ file resource with action:create. The following issue occurs during execution (some information has been redacted): ...
GINA's user avatar
  • 11
-1 votes
1 answer
47 views

Python_Cookbook_3rd_Edition 6.12 a Question

Python_Cookbook_3rd_Edition 6.12. Reading Nested and Variable-Sized Binary Structures import struct import itertools def write_polys(filename, polys): # Determine bounding box flattened = ...
ShijieHuo's user avatar
0 votes
0 answers
81 views

Does Chef include comments in line count

I'm looking at output in chef-stacktrace.out to troubleshoot a cookbook error. The output indicates an error corresponding to an earlier line than I see in my code. The only reason that would make ...
J1raya's user avatar
  • 340
3 votes
1 answer
245 views

Is it possible to selectively sync cookbooks with knife bootstrap?

I'm trying to get a server up and running via knife bootstrap via this command: knife bootstrap "<ip-address>" -x ec2-user -r recipe[connector],recipe[all-servers] -N "serv-name" -E staging ...
Cdhippen's user avatar
  • 655
0 votes
1 answer
906 views

How to capture `systemctl status` and `journalctl -xe` from a kitchen run inside a Jenkins job

I have a Jenkins job running kitchen converge that is giving the following error: ---- Begin output of /bin/systemctl restart docker ---- STDOUT: STDERR: Job for docker.service failed because the ...
Marcos Oliveira's user avatar
0 votes
1 answer
359 views

How to Assign a batch command output to Chef recipe attribute

I have a windows command to check the directory which is updated recently . for /f "delims=" %a in (' dir C:\Users\Username\cookbooks /ad /od /b ') do set "Last=%a"; echo %Last%; I would like to ...
Sankareswar's user avatar
0 votes
2 answers
71 views

Which command could be used for extracting cookbooks for current run list via chef-client under *UNIX system?

Env: chef-client --version Chef: 14.3.37 Description: Chef-client was run via following command chef-client -c <file.rb> -j <file.json> -E <env> 2>&1 > file.log After ...
Yuriy Leonov's user avatar
1 vote
1 answer
248 views

Cookbook's deep dependency requires an unavailable Ruby version. How to circumvent via chef for Amazon Linux?

I'm a non-Ruby developer using Chef 11.10 on Amazon Linux AMI 2018.03, OpsWorks Agent v.3451. My Route53 cookbook requires fog which requires fog-brightbox which requires an unspecified version of ...
eschie's user avatar
  • 303
0 votes
1 answer
188 views

Unable to create a file inside a cookbook

Am learning chef by self study,am unable create a file inside my chef cook book Fallowing are my steps,which i've done in linux instance Created a Directoy(using mkdir command) named it as cookbooks ...
Subrahmanyam vishnubhatla's user avatar
0 votes
1 answer
101 views

Issue with Vagrant apache2 cookbook

Issue that i have is about starting vagrant on some older project. I am on Ubuntu 18.04 and vagrant worked fine until i installed ssd on my laptop (not sure if related). So when i do Vagrant up i get ...
jovannet's user avatar
0 votes
1 answer
835 views

How to Create a User and Group in User Resource

I am creating a user on my RHEL box with the command: useradd -d <home_path> -m -s <shell_path> -U <name> where I want the group to be created when the user is created. The ...
user3299745's user avatar
0 votes
2 answers
6k views

Accepting Chef Infra Client license agreement for version >= 14

I'm trying to bootstrap a node using chef by using the command knife bootstrap <host> --ssh-user '<username>' -i <my-identity>.pem --sudo --use-sudo-password --node-name <node-...
neaGaze's user avatar
  • 1,451
0 votes
1 answer
82 views

Chef: private supermarket cookbook directly on server

I have a cookbook which is available on a private chef supermarket and I have 4 chef servers which need this cookbook to be available so that corresponding nodes can consume it. We can use berks ...
Vishwa's user avatar
  • 57
0 votes
2 answers
877 views

Get instance public ip with chef recepie

I try to get ip address of the instance and create my cron job: command "curl --silent \"http://#{instance['public_ip']}/module.php/cron/cron.php?key=TPUmg16HBBZ8G2LgyySulHHuC2fGdIjf&tag=hourly\" ...
hamdi Hasnaoui's user avatar
0 votes
1 answer
89 views

Error `create` on resource 'template[/etc/awslogs//cwlogs.cfg]'

I am trying to do a chef run but keep receiving the error in the title. The log output is as follows; Error executing action `create` on resource 'template[/tmp/cwlogs.cfg]' ==========================...
hamdi Hasnaoui's user avatar

1
2 3 4 5
11