From 9f917c5e27c65f30be2f6411e9400f0242aa32d0 Mon Sep 17 00:00:00 2001 From: Markus Wagner Date: Thu, 9 Feb 2017 15:37:16 +0100 Subject: [PATCH] lazy evaluation of the template variables Signed-off-by: Markus Wagner --- recipes/_common.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/_common.rb b/recipes/_common.rb index 0e23f0e..e738d39 100644 --- a/recipes/_common.rb +++ b/recipes/_common.rb @@ -135,7 +135,9 @@ end group node['root_group'] mode '0644' notifies :restart, 'service[postfix]' - variables(settings: node['postfix'][cfg]) + variables( + lazy { { settings: node['postfix'][cfg] } } + ) cookbook node['postfix']["#{cfg}_template_source"] end end