Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Chef Override Attributes in KITCHEN_YAML (default/attributes vs Chef env vs KITCHEN_YAML

So here is my question - providing some context. We have a use case where we have an attribute - holding an array of values defined in Cookbook - attributes/default.rb file. The attribute is ...
Jojo Thomas's user avatar
0 votes
0 answers
80 views

Test Kitchen from Jenkins for AmazonLinux 2023

I'm having an issue running "kitchen test" from Jennkins. When I run "kitchen test" from my local workstation, I'm using AWS EC2 instances to run tests against and I can get ...
Daniel Carrington's user avatar
0 votes
1 answer
163 views

How to tell Test Kitchen to use a Shared Image Gallery image from Azure?

I am using Test Kitchen with the kitchen-azurerm driver to test my Chef code and am writing a configuration for testing my code against various Azure configurations. One such case is I must make sure ...
codewario's user avatar
  • 21k
0 votes
1 answer
252 views

test-kitchen command not found

I'm trying to test chef recipe locally using test kitchen docker, I installed chef workstation, chef, and test kitchen but kitchen still complaints "Kitchen not found" -bash: kitchen: ...
itgeek's user avatar
  • 569
0 votes
1 answer
437 views

kitchen terraform error - Could not load the 'terraform' driver. Error: undefined method `size' for nil:NilClass

I'm following https://newcontext-oss.github.io/kitchen-terraform/getting_started.html However, when I try and run: bundle exec kitchen converge I get the following error: >>>>>> -----...
Rubans's user avatar
  • 4,438
1 vote
2 answers
263 views

What is the difference between kitchen.yml and .kitchen.yml in chef?

What is the difference between kitchen.yml and .kitchen.yml? Why that extra dot in the beginning? I can only find the below statement in google and nothing else to help. As of test-kitchen 1.21.0, we ...
Manikanta's user avatar
1 vote
1 answer
103 views

Test Kitchen Chef Zero Use Sudo to create root_path

I'm trying to match Chef zero with what's actually used on my Chef server by setting the root_path to /etc/chef from the default /tmp/kitchen. After Chef is installed I get the following error: ...
Ken Jenney's user avatar
0 votes
1 answer
485 views

Execute instructions in chef recipes only for Test Kitchen converge action

I need a way to run parts of chef recipes only in case of converge action in Test Kitchen. I found a way to do it for ChefSpec: unless defined?(ChefSpec) cookbook_file "/home/#{node['user']}/...
FidleG's user avatar
  • 23
0 votes
1 answer
72 views

Can't export data_bag items using chef in kitchen

The error occurs while trying to converge node. NoMethodError ------------- undefined method `[]' for nil:NilClass Cookbook Trace: --------------- /tmp/kitchen/...
FidleG's user avatar
  • 23
1 vote
2 answers
713 views

Using terraform output in kitchen terraform tests

I am using Kitchen terraform to deploy/test a environment on GCP. I am struggling to get the kitchen/inspec part to use the terraform output values, so i can use them in my tests. This is what I have ...
TheOne745665's user avatar
1 vote
1 answer
1k views

How to set disk size for a virtualbox vm in Chef's Test Kitchen

Pretty much what the title says: I need Kitchen to tell VirtualBox that the VM's hard drive should be 500gb. I've scoured the docs and not found anything (kitchen.ci). Am I just not looking in the ...
Jake's user avatar
  • 906
0 votes
1 answer
105 views

Handling Terraform provider credentials in distributed environment with InSpec and remote state

Does anyone have any cool ideas on how to handle Terraform provider credentials for AWS given these use cases: Distributed environments (prod/pre/qa/test/dev) with individual AWS accounts S3 backend ...
XeonFibre's user avatar
0 votes
1 answer
85 views

Unable to resolve chef roles with TestKitchen

I am trying to just log an attribute from a chef role using TestKitchen Bellow my configuration: roles/myrole.json { "name": "myrole", "json_class": "Chef::Role&...
proximator's user avatar
0 votes
0 answers
766 views

Test-Kitchen Cannot Converge Centos Machine using kitchen-vra

I'm trying to converge a test-kitchen image, using Centos catalog item, in vra, below are my results. I'm able to kitchen create, but converge gives the errors I am showing in the log section below. ...
Kawika Moss's user avatar
2 votes
1 answer
258 views

Error installing chef-client on ubuntu 18.04

I am performing the convergence of a recipe but the convergence fails not because of the recipe but because of the installation of chef-client. This is error Preparing to unpack .../cache/chef_16.2....
Vincenzo Freddo La Forgia's user avatar
2 votes
3 answers
748 views

How to enable specific Ohai plugin on a node in Test Kitchen

I wanted to enable Passwd ohai plugin in my node in test kitchen. On a regular node, I've done it by adding: ohai.optional_plugins = [ :Passwd ] to /etc/chef/client.rb. I wanted to achieve ...
Learner's user avatar
  • 162
0 votes
2 answers
551 views

kitchen converge failed on ubuntu 18.04

When I run "kitchen converge" kitchen I can't install chef and the following output comes out Installing chef installing with dpkg... (Reading database ... 42662 files and directories ...
Vincenzo Freddo La Forgia's user avatar
1 vote
1 answer
925 views

chef test-kitchen run only default recipe

I installed chef workstation on windows, I have 2 recipes, default and install_nginx, when I run kitchen converge, kitchen only executes the default recipe. For security I do kitchen verify and it ...
Vincenzo Freddo La Forgia's user avatar
1 vote
2 answers
1k views

Chef Policyfile.rb `include_policy` doesn't guarantee immutability of policy dependency

Let's say I have a Polcyfile.rb in a cookbook called motd: name 'motd' default_source :chef_repo, "../" include_policy "Policyfile", path: "../environment" run_list 'motd' and a ...
ethan123's user avatar
  • 1,084
0 votes
1 answer
165 views

Can I run a subset of tests from one Github repo in Test Kitchen?

I reached the point where I think it makes sense to put my inspec tests in a different repo than my Chef cookbook. I just copied all dirs under test/integration into a new dir and created a repo from ...
Yegolev's user avatar
  • 13
0 votes
1 answer
2k views

chef-client error: Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/chef_guid

We are using test kitchen to test our chef cookbooks. On running chef-client inside the kitchen container, I am seeing this error: [2020-03-21T07:22:21+00:00] WARN: **********************************...
user674669's user avatar
0 votes
1 answer
115 views

Testkitchen / KitchenCI - How to change console output colors?

In the present case Ansible is used with KitchenCI/Testkitchen. Question: How can I control the color of the kitchen output? I tried different coloroptions in ansible but for kitchen I didn't find ...
MacMartin's user avatar
  • 2,716
0 votes
2 answers
398 views

Chef Kitchen converge is generating [No space left on device - write] error

On a Windows 10 host, vagrant, and a local virtual box VM (Windows Server 2012 R2), I suddenly began seeing the following error when performing a kitchen converge: -----> Starting Kitchen (v2.2.5) ...
Brandon Hawbaker's user avatar
0 votes
1 answer
452 views

Could not load the 'vagrant' driver from the load path Test Kitchen, downloading new versions doesn't work

When I try to run kitchen test on terminal I'm greeted with >>>>>> ------Exception------- >>>>>> Class: Kitchen::ClientError >>>>>> Message: ...
Cdhippen's user avatar
  • 645
0 votes
0 answers
108 views

Test Kitchen is Broken on Ubuntu 18.04 Because of Rspec Mismatch

I've run tests in the same environment for weeks now without issues. Just today I started getting errors: /opt/chef/embedded/bin/ruby -I/tmp/verifier/suites/serverspec -I/tmp/verifier/gems/gems/rspec-...
Ken Jenney's user avatar
0 votes
3 answers
709 views

Coerce command('stdout') to integer for math comparison

Given a checker script deployed to my server at path /tmp/foo with the following content... #!/bin/bash a=`cat /tmp/a` b=`cat /tmp/b` echo -n $( expr $a - $b ) ...I have an InSpec test to evaluate ...
Peter Vandivier's user avatar
0 votes
1 answer
484 views

After updating ChefDK, I get the error "undefined local variable or method `credentials_file'" in Test Kitchen or an error in credentials.rb in knife

This issue was discovered after upgrading from ChefDK 3.2.30 to 4.2.0, and everything worked fine before the upgrade (Including these two commands). The full error from "knife node list": C:/opscode/...
Taegost's user avatar
  • 1,208
0 votes
1 answer
118 views

Is there a way to share attributes in test kitchen suites?

Is there a way we can share attributes between test kitchen suites for eg: Current setup suite1: att1: "foo" suite2: attr1: "foo" New Setup suites: attr1: "foo"
Jeetendra Pujari's user avatar
0 votes
1 answer
583 views

How would I import my id_rsa ssh key in test-kitchen (kitchen.yml) so I may use it to log into all kitchen managed VMs?

from my kitchen.yml I am using the vagrant driver and trying to get my id_rsa key to import so that I may use it to ssh into these hosts. Here is my kitchen.yml: #kitchen.yml --- driver: name: ...
aphexlog's user avatar
  • 1,725
0 votes
1 answer
450 views

Error: Connection refused connecting to locahost - Berkshelf - Test Kitchen

I having an issue when running kitchen converge on Test Kitchen with Dokken driver and Inspec as verifier. The error occurred when the starting to resolving the cookbook dependencies 7.0.6 ...
Edmhar's user avatar
  • 650
1 vote
1 answer
1k views

Cant accept license while running kitchen test

I run kitchen test, cant accept the license, answer yes does nothing kitchen.yml provisioner: name: chef_zero always_update_cookbooks: true retry_on_exit_code: - 35 # 35 is the exit code ...
Hareesh's user avatar
  • 29
0 votes
1 answer
324 views

Chef Nessus Agent Install

I am trying to write a cookbook to download and install Nessus Agent found here: https://www.tenable.com/downloads/nessus-agents But am having trouble due to an explicit download url not being ...
okstef's user avatar
  • 11
0 votes
1 answer
144 views

puppet/hiera : the module class cannot be found durins a puppet apply

During a kitchen converge, calling a puppet apply, i got this error : Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::alibi for ... at .. entry.pp alibi is ...
Minstrel's user avatar
  • 379
0 votes
0 answers
60 views

Writing chef test-kitchen integration tests for logstash filters

There is a lot of ways to test logstash pipelines including: 1) Using logstash command line using config file 2) https://github.com/magnusbaeck/logstash-filter-verifier The question is whether it's ...
Andrei's user avatar
  • 312
0 votes
1 answer
113 views

Chef firewall cookbook not working with custom JSON objects

I am playing around with the firewall cookbook: cookbook 'firewall', '~> 2.7.0' Not sure if it's just me but the instructions are not very clear but I gave it the old college try... What I am ...
Jeremy's user avatar
  • 1,975
0 votes
1 answer
205 views

My Vagrant machine from chef kitchen cannot access the internet

I am trying to learn how to do local development of chef recipes. I am following this guide https://gist.github.com/smford22/f00f46471047422bd8a7 I am prefixing all the kitchen commands with chef ...
swagrov's user avatar
  • 1,398
1 vote
2 answers
337 views

Is it possible to get platform or suite names found in .kitchen.yml inside a recipe?

.kitchen.yml: platforms: - name: win2012r2 suites: - name: example Is it possible to get the running platform or suite name from within a recipe? I've tried node['platform'] and node['suite'] ...
Reed G. Law's user avatar
  • 3,926
0 votes
1 answer
728 views

kitchen create error: Failed to complete #create action: [work_image build failed: The command '/bin/sh -c yum install -y hostname iproute less lsof

I am getting an error while running $ kitchen create Does anyone know what am I doing wrong? INFO -- Kitchen: -----> Starting Kitchen (v1.21.2) INFO -- Kitchen: -----> Creating <default-...
user674669's user avatar
0 votes
1 answer
61 views

How to get image from a docker repo for test kitchen

I need to test my application with Docker Image httpd and when i add it to the current .kitchen.yaml file it fails with the error: root@ip-172-31-1-22:~/test1# kitchen test -----> Starting Kitchen ...
anish anil's user avatar
  • 2,590
0 votes
1 answer
733 views

How to preserve existing host file when running chef template resource

I'm trying to add new set of FQDN and IPs into the existing Windows hosts file by using the Chef template resources. What I found out is when I ran the chef recipe it will erase the existing hosts ...
Fang's user avatar
  • 161
2 votes
2 answers
489 views

Kitchen-Docker specify image name for Dockerfile

I am currently using kitchen-docker driver for testing my cookbooks. Wondering how to specify a image name:tag for the image that is build by the kitchen create command. Here is my .kitchen.yml : ---...
Dinesh's user avatar
  • 1,800
0 votes
0 answers
50 views

why my gem is not found although it exists in the forge?

During a kitchen verify : $ cat test/integration/advanced/serverspec/Gemfile source 'https://rubygems.org' gem 'net-ssh', '3.2.0'
Minstrel's user avatar
  • 379
0 votes
2 answers
353 views

Error executing action `install` on resource 'windows_feature[AD-Domain-Services]' - on Windows server 2016 chef run with windows_feature resource

error: Error executing action `install` on resource 'windows_feature[AD-Domain-Services]' ^ this happens on all windows features when installing them via windows_feature resource on windows server ...
aphexlog's user avatar
  • 1,725
1 vote
1 answer
898 views

Chef reboot resource causes chef run to time out before Windows server is able to start back up after update and resume recipe

I am trying to create a domain on a windows 2012 R2 server and it requires a reboot before the recipe can proceed: reboot "reboot server" do reason "init::chef - continue provisioning after reboot" ...
aphexlog's user avatar
  • 1,725
0 votes
2 answers
1k views

Ruby returns uninitialized constant error when trying to include a module within a chef recipe

I have a java/recipes/windows recipe that uses a method called win_friendly_path and it doesn't work because win_friendly_path is not yet defined. win_friendly_path is however defined in the ../...
aphexlog's user avatar
  • 1,725
0 votes
2 answers
67 views

Can't figure out the complete path of JSON environment for Kitchen/Chef

I don't know how to set the full path of environement JSON file. I guess the path is composed of multiple level, but it's not described in doc The path is now environment/dev.json, what is a correct ...
Mévatlavé Kraspek's user avatar
-1 votes
1 answer
251 views

Chef kitchen tests, how to pass multiple Chef cookbooks AWS Opsworks like?

I try to test Chef cookbooks on Centos 7 OS locally. I follow https://learn.chef.io/modules/local-development/rhel/virtualbox/apply-a-cookbook#/ --- driver: # specifies the software that manages ...
Gilles Quénot's user avatar
1 vote
1 answer
258 views

How to debug an Opsworks/Chef 11.10.4 cookbook locally on Linux (Debian9) using Centos Vagrant guest (Amazon Linux like)

I searched for this for 3 weeks but didn't find any real answer. The main goal is to save time to test dev Chef cookbooks locally before deploying on production on AWS. All I found is some hints ...
Gilles Quénot's user avatar
0 votes
1 answer
62 views

Test Kitchen with existing chef node

If I already have a node provisioned using $ knife bootstrap... and in my list of servers $ knife list, can I just point kitchen to that node and have it converge so I can then run verify on it?
Greg's user avatar
  • 432
0 votes
0 answers
156 views

Running specific puppet tests using kitchen

I am using kitchen to run inspec tests for the puppet repository. I am able to apply the entire puppet catalogue ina vagrant box and then run tests for it. But what if I want to run a specific module ...
leoOrion's user avatar
  • 1,913

1
2 3 4 5
8