varnish icon indicating copy to clipboard operation
varnish copied to clipboard

Chef not reading parameters hash

Open gangadhar01a opened this issue 4 years ago • 1 comments

:speaking_head: Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

:ghost: Brief Description

I have declared parameters as hash as shown below, after the chef ran these parameters are not reflected in the varnish config.

  parameters = { 'thread_pool_min' => '5',
     'thread_pool_max' => '5000',
     'thread_pool_timeout' => '300' }

Tried the following definition which updated the varnish config but chef lint resulted in an error

  parameters ({ 'thread_pool_min' => '5',
     'thread_pool_max' => '5000',
     'thread_pool_timeout' => '300' })

Lint error:

recipes/varnishinstall.rb:22:13: W: Lint/ParenthesesAsGroupedExpression: (...) interpreted as grouped expression.
  parameters ({
            ^

:pancakes: Cookbook version 4.0.1

Version of the cookbook where you are encountering the issue.

:woman_cook: Chef-Infra Version 14

Version of chef-client in your environment.

:tophat: Platform details

OS: centos 7 Operating system distribution and release version. Cloud provider if running in the cloud.

gangadhar01a avatar Apr 01 '20 20:04 gangadhar01a

You should be able to do it via the following:

parameters { 
  foo: 'bar'
}

ramereth avatar Oct 04 '20 02:10 ramereth