Skip to content

Instantly share code, notes, and snippets.

@JSONOrona
Created September 27, 2019 14:41
Show Gist options
  • Save JSONOrona/d0f63913db0ddf8dd59d88a8968747de to your computer and use it in GitHub Desktop.
Save JSONOrona/d0f63913db0ddf8dd59d88a8968747de to your computer and use it in GitHub Desktop.

Version

Chef-Client 15.x

Environment: OS: Windows 2016

Scenario:

Chef Infra Client is installed in our environment using an unattended bootstrap script. When passing our custom attributes via a first-boot.json we recieve this error TypeError: wrong argument type Hash (expected String). This doesn't not happen on versions 14.x and below.

Sample of our first-boot.json

{
   "tfs":{
      "datacenter":"tcx",
      "cloud":"vmware_manual",
      "environment":"test",
      "snow_ritm":"12435"
   },
   "run_list":[
      "recipe[bts-chef-client::install_service]"
   ]
}

Steps to Repoduce:

  1. On a fresh install of Windows 2016 that contains the C:/chef folder with validation.pem and client.rb run the below command in powershell with elevated privileges.

chef-client -j first-boot.json

  1. The type error should come up at the beginning of the run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment