summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Galić <i.galic@brainsware.org>2015-09-02 21:00:31 +0200
committerIgor Galić <i.galic@brainsware.org>2015-09-02 21:00:31 +0200
commit23475aabeff8d2c282efcf8638a66a85c2674b0d (patch)
tree56e11dde2e1042fa17d9ebef67010e1e65d411c7
parent886df1d1f0fd7e4c274be8da05df016de9f7b65d (diff)
parent286803d9142a7026aaf8fb5be73f57ce7d4d5605 (diff)
Merge pull request #14 from cpick/fix-ubuntu-origins
unattended-upgrades are broken on Ubuntu by default due to origins typo
-rw-r--r--manifests/params.pp4
-rw-r--r--spec/classes/unattended_upgrades_spec.rb9
2 files changed, 8 insertions, 5 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
index 27beac7..04ba3ec 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -48,8 +48,8 @@ class unattended_upgrades::params {
}
'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')
diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb
index f78eaa9..1333434 100644
--- a/spec/classes/unattended_upgrades_spec.rb
+++ b/spec/classes/unattended_upgrades_spec.rb
@@ -96,7 +96,7 @@ describe 'unattended_upgrades' do
let(:facts) { {
:osfamily => 'Debian',
:lsbdistid => 'Ubuntu',
- :lsbistcodename => 'truste',
+ :lsbistcodename => 'trusty',
:lsbrelease => '14.04',
} }
it {
@@ -105,8 +105,11 @@ describe 'unattended_upgrades' do
'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