# Configuration for getaddrinfo(3).
# Managed by Puppet!
#
# label   <mask>   <value>
#    Add another rule to the RFC 3484 label table.
#    See section 2.1 in RFC 3484.
#
<% @label.each do |key, value| -%>
<%= sprintf("label %-24s %s", key, value) %>
<% end -%>
#
# precedence  <mask>   <value>
#    Add another rule to the RFC 3484 precedence table.
#    See section 2.1 and 10.3 in RFC 3484.
#
<% @precedence.each do |key, value| -%>
<%= sprintf("precedence %-24s %s", key, value) %>
<% end -%>
#
# scopev4  <mask>  <value>
#    Add another rule to the RFC 3484 scope table for IPv4 addresses.
#    See section 3.2 in RFC 3484.
#
<% @scopev4.each do |key, value| -%>
<%= sprintf("scopev4 %-24s %s", key, value) %>
<% end -%>
#
# reload  <yes|no>
#    If set to yes, each getaddrinfo(3) call will check whether this file
#    changed and if necessary reload. This option should not really be
#    used.
#
<% if @reload and not @reload.empty? -%>
reload <%= @reload %>
<% end -%>

# This file is managed by Puppet.
#
# Configuration for getaddrinfo(3).
#
# label   <mask>   <value>
#    Add another rule to the RFC 3484 label table.
#    See section 2.1 in RFC 3484.
#
<% @label.each do |key, value| -%>
label <%= '%-24s' % key -%> <%= value %>
<% end -%>
#
# precedence  <mask>   <value>
#    Add another rule to the RFC 3484 precedence table.
#    See section 2.1 and 10.3 in RFC 3484.
#
<% @precedence.each do |key, value| -%>
precedence <%= '%-24s' % key -%> <%= value %>
<% end -%>
#
# scopev4  <mask>  <value>
#    Add another rule to the RFC 3484 scope table for IPv4 addresses.
#    See section 3.2 in RFC 3484.
#
<% @scopev4.each do |key, value| -%>
scopev4 <%= '%-24s' % key -%> <%= value %>
<% end -%>
#
# reload  <yes|no>
#    If set to yes, each getaddrinfo(3) call will check whether this file
#    changed and if necessary reload. This option should not really be
#    used.
#
<% if @reload and not @reload.empty? -%>
reload <%= @reload %>
<% end -%>

Use string format instead of sprintf in template
Use string format instead of sprintf in template
