Add "oldstable" to the default update origins to ensure
the updates keep working after wheezy+1 gets released
See unattended-upgrades 0.79.5+wheezy1 and https://bugs.debian.org/711826
'wheezy': {
$backports_location = 'http://ftp.debian.org/debian/'
$legacy_origin = false
- $origins = ['origin=Debian,archive=stable,label=Debian-Security']
+ $origins = ['origin=Debian,archive=stable,label=Debian-Security',
+ 'origin=Debian,archive=oldstable,label=Debian-Security']
}
default: {
$backports_location = 'http://http.debian.net/debian/'
it { is_expected.to_not contain_file("/etc/apt/apt.conf.d/10periodic").with_content %r{APT::Periodic::RandomSleep}}
end
+ context 'wheezy' do
+ let :facts do
+ {
+ 'lsbdistid' => 'debian',
+ 'lsbdistcodename' => 'wheezy',
+ }
+ end
+
+ it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::Origins-Pattern \{\n\t"origin=Debian,archive=stable,label=Debian-Security";\n\t"origin=Debian,archive=oldstable,label=Debian-Security";\n\};} }
+ end
+
context 'anything but defaults' do
let :facts do
{