Skip to content

Commit cd4592d

Browse files
baurmattdavejrt
authored andcommitted
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.
1 parent c1283da commit cd4592d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
$socket_group = $socket_group_default
148148
$use_upstream_package_source = true
149149
$pin_upstream_package_source = true
150-
$apt_source_pin_level = 10
150+
$apt_source_pin_level = 500
151151
$repo_opt = undef
152152
$service_config = undef
153153
$storage_setup_file = undef

spec/classes/docker_spec.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@
5353
it { should contain_class('apt') }
5454
it { should contain_package('docker').with_name('docker-ce').with_ensure('present') }
5555
it { should contain_apt__source('docker').with_location('https://download.docker.com/linux/ubuntu') }
56-
it { should contain_apt__pin('docker').with_origin('download.docker.com') }
56+
it { should contain_apt__pin('docker')
57+
.with_ensure('present')
58+
.with_origin('download.docker.com')
59+
.with_priority(500)
60+
}
5761
it { should contain_package('docker').with_install_options(nil) }
5862

5963
it { should contain_file('/etc/default/docker').without_content(/icc=/) }
@@ -64,7 +68,11 @@
6468
it { should contain_class('apt') }
6569
it { should contain_package('docker').with_name('docker-ce').with_ensure('present') }
6670
it { should contain_apt__source('docker').with_location('https://download.docker.com/linux/debian') }
67-
it { should contain_apt__pin('docker').with_origin('download.docker.com') }
71+
it { should contain_apt__pin('docker')
72+
.with_ensure('present')
73+
.with_origin('download.docker.com')
74+
.with_priority(500)
75+
}
6876
it { should contain_package('docker').with_install_options(nil) }
6977

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

0 commit comments

Comments
 (0)