Update docs and test for $legacy_origin
authorMorgan Haskel <morgan@puppetlabs.com>
Fri, 13 Mar 2015 21:56:53 +0000 (14:56 -0700)
committerMorgan Haskel <morgan@puppetlabs.com>
Fri, 13 Mar 2015 21:56:53 +0000 (14:56 -0700)
README.md
spec/classes/unattended_upgrades_spec.rb

index 0bf17c4d63fd2d0a2d4ed957954c34480ef06a8b..501adc658dff6443e8f93704b2901fae312bec13 100644 (file)
--- a/README.md
+++ b/README.md
@@ -278,6 +278,7 @@ apt::sources:
 
 ####apt::unattended_upgrades
 
+* `legacy_origin`: If set to true, use the old `Unattended-Upgrade::Allowed-Origins` variable. If false, use `Unattended-Upgrade::Origins-Pattern`. OS-dependent defaults are defined in `apt::params`.
 * `origins`: The repositories from which to automatically upgrade included packages.
 * `blacklist`: A list of packages to **not** automatically upgrade.
 * `update`: How often, in days, to run `apt-get update`.
index 3742bf1c2add1dd9206ae849d4b6a797210b91ed..0a02755536953e0f191567775a47eadda74a0afe 100644 (file)
@@ -155,6 +155,7 @@ describe 'apt::unattended_upgrades', :type => :class do
 
     let :params do
       {
+        'legacy_origin'       => true,
         'enable'              => '0',
         'backup_interval'     => '3',
         'backup_level'        => '1',
@@ -181,7 +182,7 @@ describe 'apt::unattended_upgrades', :type => :class do
       }
     end
 
-    it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::Origins-Pattern \{\n\t"bananas";\n\};} }
+    it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::Allowed-Origins \{\n\t"bananas";\n\};} }
     it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::Package-Blacklist \{\n\t"foo";\n\t"bar";\n\};} }
     it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::AutoFixInterruptedDpkg "false";}}
     it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::MinimalSteps "true";}}