From 5102b7863b09e58bdd712c9019885313270299ce Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 29 Jun 2016 15:49:22 +0000 Subject: Drop apt::cron::download, and turn $apt_cron_hours into a class parameter for apt::cron::dist_upgrade. I've introduced apt::cron::download, am not using it anymore, and have never seen anyone else submit a bug or a merge request for it. Thus, I feel pretty confident in dropping it. And this allows me to trivially get rid of the $apt_cron_hours global variable noticed by LeLutin in #13. --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index f6a0c4a..7431038 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Ubuntu support is lagging behind but not absent either. ## Upgrade Notice + * The `$apt_cron_hours` global variable is deprecated. + Use `apt::cron::dist_upgrade`'s `cron_hours` parameter instead. + * The default value of the `$repos` parameter was removed since the logic is now in the `apt::params` class. If you have explicitly set `$repos` to 'auto' in your manifests, you should remove this. -- cgit v1.2.3 From c439b8a524fc8f797e98b2c5351b028cf91ce237 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 29 Jun 2016 18:45:32 +0000 Subject: Remove documentation for apt::cron::download, and document the new parameter to apt::cron::dist_upgrade. --- README.md | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2173d7e..2028e2a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ * [Classes](#classes) * [apt](#apt) * [apt::apticron](#apt-apticron) - * [apt::cron::download](#apt-cron-download) * [apt::cron::dist_upgrade](#apt-cron-dist_upgrade) * [apt::dist_upgrade](#apt-dist_upgrade) * [apt::dist_upgrade::initiator](#apt-dist_upgrade-initiator) @@ -324,30 +323,20 @@ Example usage: } -## apt::cron::download +## apt::cron::dist_upgrade -This class sets up `cron-apt` so that it downloads upgradable packages, does not -actually do any upgrade and emails when the output changes. +This class sets up cron-apt so that it dist-upgrades the system and +emails when upgrades are performed. `cron-apt` defaults to run at 4 AM. You may want to set the -`$apt_cron_hours` variable before you include the class: its value will +`$cron_hours` class parameter before you include the class: its value will be passed as the "hours" parameter of a cronjob. Example: # Run cron-apt every three hours - $apt_cron_hours = '*/3' + class { 'apt::cron::dist_upgrade': cron_hours => '*/3' } Note that the default 4 AM cronjob won't be disabled. - -## apt::cron::dist_upgrade - -This class sets up cron-apt so that it dist-upgrades the system and -emails when upgrades are performed. - -See [apt::cron::download](#apt-cron-download) above if you need to run `cron-apt` more often -than once a day. - - ## apt::dist_upgrade This class provides the `Exec['apt_dist-upgrade']` resource that -- cgit v1.2.3 From 13cb9fb48538fc7eed9b2f924aa4c84dd1434e3b Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 29 Jun 2016 18:49:23 +0000 Subject: Move documentation to README, and expand a bit on it. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index c0d5f85..185efb0 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,11 @@ classes may inherit from this one and add to its subscription list using the plusignment (`+>`) operator. A real-world example can be seen in the `apt::dist_upgrade::initiator` source. +Parameters: + + * timeout: specified in seconds; the maximum time the `dist-upgrade` + command should take. If the command takes longer than the timeout, + the command is considered to have failed and will be stopped. ## apt::dist_upgrade::initiator -- cgit v1.2.3