zuazo/mumble_server-cookbook

View on GitHub
templates/default/config.ini.erb

Summary

Maintainability
Test Coverage
# Generated by Chef

# Murmur configuration file.
#
# General notes:
# * Settings in this file are default settings and many of them can be overridden
#   with virtual server specific configuration via the Ice or DBus interface.
# * Due to the way this configuration file is read some rules have to be
#   followed when specifying variable values (as in variable = value):
#     * Make sure to quote the value when using commas in strings or passwords.
#        NOT variable = super,secret BUT variable = "super,secret"
#     * Make sure to escape special characters like '\' or '"' correctly
#        NOT variable = """ BUT variable = "\""
#        NOT regex = \w* BUT regex = \\w*

<%
  if @values.is_a?(Hash)
    values = MumbleServer::Conf.sort(@values)
    values.each do |key, value|
      if value.is_a?(Hash)
-%>
[<%= key.to_s %>]
<%
        value.each do |subkey, value|
-%>
<%=   MumbleServer::Conf.key_value("#{key}.#{subkey}", value) %>
<%
        end
      else
-%>
<%=   MumbleServer::Conf.key_value(key, value) %>
<%
      end
    end
  else
-%>
<%= @values.to_s %>
<%
  end
-%>