From cd4592d513df13872abfa23bcb93d32f9a032b0e Mon Sep 17 00:00:00 2001 From: Matthias Baur Date: Tue, 12 Feb 2019 23:52:16 +0100 Subject: [PATCH] Increase apt pin from 10 to 500 (#425) As the default of this module is to install Docker from the offical Docker repository, we should also configure the pin accordingly. Fixes #424. --- manifests/params.pp | 2 +- spec/classes/docker_spec.rb | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 1f4434020d..1c34b11d85 100755 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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 diff --git a/spec/classes/docker_spec.rb b/spec/classes/docker_spec.rb index 93fcae50ba..3808a1644e 100755 --- a/spec/classes/docker_spec.rb +++ b/spec/classes/docker_spec.rb @@ -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=/) } @@ -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=/) }