From 0dd91ce9e96e23195c6248997b649f634c60693b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 2 Jul 2020 16:20:20 +0100 Subject: [PATCH] Cope with having no communities --- cookbooks/snmpd/templates/default/snmpd.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/snmpd/templates/default/snmpd.conf.erb b/cookbooks/snmpd/templates/default/snmpd.conf.erb index e47f2e03f..3b79ad1f8 100644 --- a/cookbooks/snmpd/templates/default/snmpd.conf.erb +++ b/cookbooks/snmpd/templates/default/snmpd.conf.erb @@ -1,6 +1,6 @@ # DO NOT EDIT - This file is being maintained by Chef -<% @communities[node[:snmpd][:community]].each do |community| -%> +<% Array(@communities[node[:snmpd][:community]]).each do |community| -%> rocommunity <%= community %> rocommunity6 <%= community %> <% end -%> -- 2.39.5