]> git.openstreetmap.org Git - chef.git/commitdiff
Cope with having no communities
authorTom Hughes <tom@compton.nu>
Thu, 2 Jul 2020 15:20:20 +0000 (16:20 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 2 Jul 2020 15:20:35 +0000 (16:20 +0100)
cookbooks/snmpd/templates/default/snmpd.conf.erb

index e47f2e03fd432cc3ab023650ff1e3d3b391f380e..3b79ad1f8a65e4b73fd9530248483573e1fe399c 100644 (file)
@@ -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 -%>