Allow custom comment for sources list
This commit is contained in:
parent
4929de0d42
commit
986bf8b02d
3 changed files with 8 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
# add an apt source
|
||||
|
||||
define apt::source(
|
||||
$comment = $name,
|
||||
$ensure = present,
|
||||
$location = '',
|
||||
$release = 'UNDEF',
|
||||
|
|
|
@ -74,7 +74,12 @@ describe 'apt::source', :type => :define do
|
|||
end
|
||||
|
||||
let :content do
|
||||
content = "#file generated by puppet\n# #{title}"
|
||||
content = "#file generated by puppet\n"
|
||||
if param_hash[:comment]
|
||||
content << "# #{comment}"
|
||||
else
|
||||
content << "# #{title}"
|
||||
end
|
||||
if param_hash[:architecture]
|
||||
arch = "[arch=#{param_hash[:architecture]}] "
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#file generated by puppet
|
||||
# <%= @name %>
|
||||
# <%= @comment %>
|
||||
deb <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %>
|
||||
<%- if @include_src then -%>
|
||||
deb-src <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %>
|
||||
|
|
Loading…
Reference in a new issue