Skip to content

Commit

Permalink
Merge pull request #44 from voxpupuli/fixes
Browse files Browse the repository at this point in the history
Doc and implementation fixes
  • Loading branch information
igalic committed Jan 8, 2016
2 parents a54d08c + 7f9c04e commit 2fa0531
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Using unattended\_upgrades simply consists of including the module and if needed
* `minimal_steps` (`true`): Split the upgrade process into sections to allow shutdown during upgrade.
* `origins`: The repositories from which to automatically upgrade included packages.
* `package_ensure` (`installed`): The ensure state for the 'unattended-upgrades' package.
* `random_sleep` (`300`): Seconds of delay on the cron job execution.
* `random_sleep` (`300`): Maximum amount of time (in seconds) that the apt cron job can sleep before the execution. The exact amount of time will be random but upto the value specified. The purpose is to avoid that servers/mirrors get hammered at exactly the same time when a lot of machines are switched on, e.g. 9:00 in the morning.
* `size` (`0`): Maximum size of the cache in MB.
* `update` (`1`): Do "apt-get update" automatically every n-days.
* `upgrade` (`1`): Run the "unattended-upgrade" security upgrade script every n-days.
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
$notify_update = undef,
) inherits ::unattended_upgrades::params {

if $legacy_origin == undef or $origins == undef {
fail('Please explicitly specify unattended_upgrades::legacy_origin and unattended_upgrades::origins.')
}

validate_bool(
$install_on_shutdown,
$legacy_origin,
Expand Down
3 changes: 2 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
}
}
default: {
fail('Please explicitly specify unattended_upgrades::legacy_origin and unattended_upgrades::origins')
$legacy_origin = undef
$origins = undef
}
}
}

0 comments on commit 2fa0531

Please sign in to comment.