Skip to content

Commit

Permalink
Increase apt pin from 10 to 500 (puppetlabs#425)
Browse files Browse the repository at this point in the history
As the default of this module is to install Docker from the offical
Docker repository, we should also configure the pin accordingly.

Fixes puppetlabs#424.
  • Loading branch information
baurmatt authored and davejrt committed Feb 12, 2019
1 parent c1283da commit cd4592d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
$socket_group = $socket_group_default
$use_upstream_package_source = true
$pin_upstream_package_source = true
$apt_source_pin_level = 10
$apt_source_pin_level = 500
$repo_opt = undef
$service_config = undef
$storage_setup_file = undef
Expand Down
12 changes: 10 additions & 2 deletions spec/classes/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
it { should contain_class('apt') }
it { should contain_package('docker').with_name('docker-ce').with_ensure('present') }
it { should contain_apt__source('docker').with_location('https://download.docker.com/linux/ubuntu') }
it { should contain_apt__pin('docker').with_origin('download.docker.com') }
it { should contain_apt__pin('docker')
.with_ensure('present')
.with_origin('download.docker.com')
.with_priority(500)
}
it { should contain_package('docker').with_install_options(nil) }

it { should contain_file('/etc/default/docker').without_content(/icc=/) }
Expand All @@ -64,7 +68,11 @@
it { should contain_class('apt') }
it { should contain_package('docker').with_name('docker-ce').with_ensure('present') }
it { should contain_apt__source('docker').with_location('https://download.docker.com/linux/debian') }
it { should contain_apt__pin('docker').with_origin('download.docker.com') }
it { should contain_apt__pin('docker')
.with_ensure('present')
.with_origin('download.docker.com')
.with_priority(500)
}
it { should contain_package('docker').with_install_options(nil) }

it { should contain_file('/etc/default/docker').without_content(/icc=/) }
Expand Down

0 comments on commit cd4592d

Please sign in to comment.