Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trusted will be a reserved word in Puppet 4 #411

Merged
merged 1 commit into from
Jan 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ apt::sources:
* `key_source`: See apt::key
* `pin`: See apt::pin
* `architecture`: can be used to specify for which architectures information should be downloaded. If this option is not set all architectures defined by the APT::Architectures option will be downloaded. Defaults to 'undef' which means all. Example values can be 'i386' or 'i386,alpha,powerpc'
* `trusted` can be set to indicate that packages from this source are always authenticated even if the Release file is not signed or the signature can't be checked. Defaults to false. Can be 'true' or 'false'.
* `trusted_source` can be set to indicate that packages from this source are always authenticated even if the Release file is not signed or the signature can't be checked. Defaults to false. Can be 'true' or 'false'.

### Testing

Expand Down
4 changes: 2 additions & 2 deletions manifests/source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
$key_source = undef,
$pin = false,
$architecture = undef,
$trusted = false,
$trusted_source = false,
) {

include apt::params
include apt::update

validate_string($architecture)
validate_bool($trusted)
validate_bool($trusted_source)

$sources_list_d = $apt::params::sources_list_d
$provider = $apt::params::provider
Expand Down
8 changes: 4 additions & 4 deletions spec/defines/source_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
'key_source' => 'http://apt.puppetlabs.com/pubkey.gpg',
'pin' => '10',
'architecture' => 'x86_64',
'trusted' => true,
'trusted_source' => true,
}
end

Expand Down Expand Up @@ -94,7 +94,7 @@
}
end

context 'trusted true' do
context 'trusted_source true' do
let :facts do
{
:lsbdistid => 'Debian',
Expand All @@ -104,8 +104,8 @@
end
let :params do
{
'include_src' => false,
'trusted' => true,
'include_src' => false,
'trusted_source' => true,
}
end

Expand Down
8 changes: 4 additions & 4 deletions templates/source.list.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#file generated by puppet
# <%= @comment %>
<%- if @include_deb then -%>
deb <%- if @architecture or @trusted -%>
[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted %>trusted=yes<% end -%>
deb <%- if @architecture or @trusted_source -%>
[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted_source %>trusted=yes<% end -%>
] <%- end %><%= @location %> <%= @release_real %> <%= @repos %>
<%- end -%>
<%- if @include_src then -%>
deb-src <%- if @architecture or @trusted -%>
[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted %>trusted=yes<% end -%>
deb-src <%- if @architecture or @trusted_source -%>
[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted_source %>trusted=yes<% end -%>
] <%- end %><%= @location %> <%= @release_real %> <%= @repos %>
<%- end -%>