Unverified Commit d36c84dc authored by Ben Abrams's avatar Ben Abrams
Browse files

adding documentation and tests for setting dpkg options unattended upgrades

Signed-off-by: default avatarBen Abrams <me@benabrams.it>
parent 4f236fd8
......@@ -83,7 +83,7 @@ For example, to prevent caching and directly connect to the repository at `downl
"cacher_server": {
"cache_bypass": {
"download.oracle.com": "http",
"nginx.org": "https"
"nginx.org": "https"
......@@ -137,6 +137,7 @@ To pull just security updates, set `origins_patterns` to something like `["origi
- `['apt']['unattended_upgrades']['random_sleep']` - Wait a random number of seconds up to this value before running daily periodic apt actions. System default is 1800 seconds (30 minutes).
- `['apt']['unattended_upgrades']['syslog_enable']` - Enable logging to syslog. Defaults to false.
- `['apt']['unattended_upgrades']['syslog_facility']` - Specify syslog facility. Defaults to 'daemon'.
- `['apt']['unattended_upgrades']['dpkg_options']` An array of dpkg options to be used specifically only for unattended upgrades. Defaults to `[]` which will prevent it from being rendered from the template in the resulting file.
### Configuration for APT
......@@ -41,7 +41,15 @@ suites:
- name: resources
- recipe[test::resources]
# test that you can specifically modify some unattended upgrades options but leave the majority in place
- recipe[test::unattended-upgrades]
excludes: centos-7
- --force-confdef
- --force-confold
- name: unattended-upgrades
if os.name == 'debian' || os.name == 'ubuntu'
describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_mode 0644 }
its(:content) { should match(/"--force-confold";/) }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment