Skip to content

Commit

Permalink
Merge pull request #14 from cpick/fix-ubuntu-origins
Browse files Browse the repository at this point in the history
unattended-upgrades are broken on Ubuntu by default due to origins typo
  • Loading branch information
igalic committed Sep 2, 2015
2 parents 886df1d + 286803d commit 23475aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
}
'ubuntu': {
$legacy_origin = true
$origins = ['${distro_id} {$distro_codename}-security', #lint:ignore:single_quote_string_with_variables
'${distro_id} {$distro_codename}-updates',] #lint:ignore:single_quote_string_with_variables
$origins = ['${distro_id} ${distro_codename}-security', #lint:ignore:single_quote_string_with_variables
'${distro_id} ${distro_codename}-updates',] #lint:ignore:single_quote_string_with_variables
}
default: {
fail('Please explicitly specify unattended_upgrades::legacy_origin and unattended_upgrades::origins')
Expand Down
9 changes: 6 additions & 3 deletions spec/classes/unattended_upgrades_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
let(:facts) { {
:osfamily => 'Debian',
:lsbdistid => 'Ubuntu',
:lsbistcodename => 'truste',
:lsbistcodename => 'trusty',
:lsbrelease => '14.04',
} }
it {
Expand All @@ -105,8 +105,11 @@
'group' => 'root',
'mode' => '0644',
}).with_content(
# This is the only line that's different for Ubuntu compared to Debian
/Unattended-Upgrade::Allowed-Origins {/
# This is the only section that's different for Ubuntu compared to Debian
/\Unattended-Upgrade::Allowed-Origins\ {\n
\t"\${distro_id}\ \${distro_codename}-security";\n
\t"\${distro_id}\ \${distro_codename}-updates";\n
};/x
)}
end

Expand Down

0 comments on commit 23475aa

Please sign in to comment.