You're right! Sorry, I didn't notice you weren't using the chef-solo. The 
same attribute must be implemented to chef-client too. Do you mind opening 
an issue for that? 
https://github.com/hashicorp/packer/issues

On Monday, April 5, 2021 at 2:13:37 PM UTC+2 [email protected] wrote:

> While this looks like it would work for chef-solo, if I use it for 
> chef-client, I get:
> Unsupported argument; An argument named
> "json_string" is not expected here.
>
> On Saturday, April 3, 2021 at 9:14:08 AM UTC-5 Sylvia Moss wrote:
>
>>
>> For HCL2 templates you must use the json_string 
>> <https://www.packer.io/docs/provisioners/chef-solo#node-attribute-mapping> 
>> option. It will be like:
>> json_string = jsonencode({ 
>>    "test_a" = {
>>             "product_1" = {"version" = "1.00.00"}
>>             "product_2" = {"version" ="1.01.00"}
>>      }
>>   })
>>
>>
>> A sábado, 3 de abril de 2021 à(s) 15:41:29 UTC+2, [email protected] 
>> escreveu:
>>
>>> For the chef-client  Provisioner , I currently use something like this 
>>> for the json option:
>>>
>>> "json": {
>>>             "test_a": {
>>>                 "product_1": 
>>>                 {"version": "1.00.00"},
>>>                 
>>>                 "product_2":
>>>                 {"version": "1.01.00}
>>>              }
>>>         }
>>>
>>> Everything that try when switching to HCL2 doesn't work.  
>>>
>>> Any help would be appreciated.
>>> thanks
>>>
>>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/a568f015-8cb7-4b7f-837f-c1787efdaac7n%40googlegroups.com.

Reply via email to