I am currently writing a script(recipe) with Chef that executes on an Azure (Linux) virtual machine. For my purposes I need to install Azure CLI on that VM. I followed these steps from the documentation. Unfortunately, I get the error that I can’t use “sudo”, and if I remove “sudo” it can’t find “azure-cli”. That part of the recipe looks
Tag: chef-infra
test kitchen stuck on “creating virtual machine”
Running chefdk on Windows 10 with hyperv. I can use kitchen create to create Windows VMs and it works fine but I just tried a Linux VM and I’m getting this errror: Now it does create a VM which I can manually ssh into via PuTTY or from cmd via openssh for Windows so I don’t know why its hanging-
ChefServer – Server returned error 502
I’m facing a problem during the Chef server configuration. When I install Chef server for the first time, everything goes well. Now, since I need to do some tests, when I uninstall Chef server and I try to install it again and add a new user, this happens: Probably is also worth to mention, that when I remove Chef server,
Chef – using a for loop with SQLEOH
I have a bash resource which is failing when attempting to loop through some ddl scripts. The same syntax without a for loop (and literal script name) works fine in Chef, and it all works including with the for loop in a terminal: The errors I am getting indicate a problem with the SQLEOH delimiter and unexpected end-of-file. What is
Packer Amazon EBS Chef – sorry, you must have a tty to run sudo
I want to use Packer for provisioning image for amazon ebs using chef. I am getting the following error message: example.json Output I think the relevant error message is: Does anybody have an idea? Answer You can use ssh_pty : true to have a TTY.
Using a Chef recipe to append multiple lines to a config file
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 file, but I dislike this approach for multiple reasons. So far the only solution I found was to use a cookbook_file and then use a bash