Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge pull request #1013 from mpdude/patch-3
[puppet-modules/puppetlabs-apt.git]
/
templates
/
source.list.epp
diff --git
a/templates/source.list.epp
b/templates/source.list.epp
index 727766c376cb092bfee570a6abdce7fa332e5ddc..2b8dd6e57d04b40d3d18b4927c291f1fdccbe8e8 100644
(file)
--- a/
templates/source.list.epp
+++ b/
templates/source.list.epp
@@
-1,10
+1,8
@@
-<%- | String $comment, Hash $includes,
$architecture, Boolean $allow_unsigned
, $location, $release, String $repos | -%>
+<%- | String $comment, Hash $includes,
Hash $options
, $location, $release, String $repos | -%>
# <%= $comment %>
<%- if $includes['deb'] { -%>
# <%= $comment %>
<%- if $includes['deb'] { -%>
-deb <%- if ($architecture or $allow_unsigned) {-%>
- [<%- if ($architecture) {%>arch=<%= $architecture %><% } %><%if ($architecture and $allow_unsigned) {%> <% }%><% if ($allow_unsigned) {%>trusted=yes<% } %>] <%- } %> <%= $location %> <%= $release %> <%= $repos %>
+deb <% if !$options.empty() { -%>[<%= $options.map |$key, $value| { if !$value.empty() { "${key}=${value}" } }.join(" ") %>] <% } -%> <%= $location %> <%= $release %> <%= $repos %>
<%- } -%>
<%- if $includes['src'] { -%>
<%- } -%>
<%- if $includes['src'] { -%>
-deb-src <%- if $architecture or $allow_unsigned { -%>
- [<%- if ($architecture) {%>arch=<%= $architecture %><% } %><%if ($architecture and $allow_unsigned) {%> <% }%><% if ($allow_unsigned) {%>trusted=yes<% } %>] <%- } %> <%= $location %> <%= $release %> <%= $repos %>
+deb-src <% if !$options.empty() { -%>[<%= $options.map |$key, $value| { if !$value.empty() { "${key}=${value}" } }.join(" ") %>] <% } -%> <%= $location %> <%= $release %> <%= $repos %>
<%- } -%>
<%- } -%>