Skip to content

Commit 2d65615

Browse files
committed
Improve template consistency and make it more concise
1 parent 27b25a3 commit 2d65615

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

templates/source_deb822.epp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
| -%>
1313
# <%= $comment %>
1414
Enabled: <%= $enabled %>
15-
Types: <% $types.each |String $type| { -%> <%= $type %> <% } %>
16-
URIs: <% $uris.each | String $uri | { -%> <%= $uri %> <% } %>
17-
Suites: <% $suites.each | String $suite | { -%> <%= $suite %> <% } %>
18-
Components: <% $components.each | String $component | { -%> <%= $component %> <% } %>
15+
Types: <%= $types.join(' ') %>
16+
URIs: <%= $uris.join(' ') %>
17+
Suites: <%= $suites.join(' ') %>
18+
Components: <%= $components.join(' ') %>
1919
<% if $architectures { -%>
20-
Architectures:<% $architectures.each | String $arch | { %> <%= $arch %><% } %>
20+
Architectures: <%= $architectures.join(' ') %>
2121
<%- } -%>
2222
<% if $allow_insecure { -%>
2323
Allow-Insecure: <%= $allow_insecure %>
@@ -29,8 +29,5 @@ Trusted: <%= $repo_trusted %>
2929
Check-Valid-Until: <%= $check_valid_until %>
3030
<% } -%>
3131
<% if $signed_by { -%>
32-
Signed-By: <% if type($signed_by) =~ Type[Array] { -%><%- $signed_by.each |String $keyring| { -%><%= $keyring %> <% } -%>
32+
Signed-By: <%= [$signed_by].flatten.join(' ') %>
3333
<%- } -%>
34-
<%- elsif type($signed_by) =~ Type[String] { -%>
35-
<%= $signed_by -%>
36-
<%- }} %>

0 commit comments

Comments
 (0)