[chef] Re: recipe_name converted to empty list


Chronological Thread 
  • From: John de la Garza < >
  • To: " " < >
  • Subject: [chef] Re: recipe_name converted to empty list
  • Date: Tue, 9 Dec 2014 15:04:34 -0500

On Tue, Dec 9, 2014 at 2:37 PM, John de la Garza
< >
 wrote:
> when I run the following recipe I get this output:
>
> ==> zs1: [2014-12-09T19:35:15+00:00] ERROR: hey john
> ==> zs1: [2014-12-09T19:35:15+00:00] ERROR: hey []
>
> why is recipe_name altered inside the logrotate_app block?  The
> resulting config files
> have [] in the place where I would expect the recipe name.
>
>
> ---recipe---
> Chef::Log.error("hey #{recipe_name}")
> logrotate_app recipe_name do
>   Chef::Log.error("hey #{recipe_name}")
>   cookbook  'logrotate'
>   path %W|/var/log/careverge/#{recipe_name}.console
> /var/log/careverge/#{recipe_name}.json|
>   frequency 'daily'
>   rotate 2
>   size '100M'
>   options %w|copytruncate compress nodelaycompress missingok|
> end

ok, I think I understand why I get this behavior

logrotate_app is a definition so it gets handled before recipe_name is 
available

can someone confirm if my understanding is correct



Archive powered by MHonArc 2.6.16.

§