diff options
author | LeLutin <gabster@lelutin.ca> | 2016-06-29 19:35:11 +0000 |
---|---|---|
committer | LeLutin <gabster@lelutin.ca> | 2016-06-29 19:35:11 +0000 |
commit | 6277c3ba14d85b0c5d0d8cad3fc25dc9aa206357 (patch) | |
tree | ed4721a272fab59dd373dafef2f2c5ba54636a4d | |
parent | 05c2603e5e63a978122b0ae10b89c720ea3d3ff0 (diff) | |
parent | 13cb9fb48538fc7eed9b2f924aa4c84dd1434e3b (diff) |
Merge branch 'feature/8-make_dist-upgrade_timeout_configurable' into 'master'
apt::dist_upgrade: add a timeout parameter (#8).
See merge request !45
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | manifests/dist_upgrade.pp | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -348,6 +348,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<a name="apt-dist_upgrade-initiator"></a> diff --git a/manifests/dist_upgrade.pp b/manifests/dist_upgrade.pp index 19c031e..3061fb8 100644 --- a/manifests/dist_upgrade.pp +++ b/manifests/dist_upgrade.pp @@ -1,8 +1,11 @@ -class apt::dist_upgrade { +class apt::dist_upgrade ( + $timeout = 300, +) { exec { 'apt_dist-upgrade': command => '/usr/bin/apt-get -q -y -o \'DPkg::Options::=--force-confold\' dist-upgrade', refreshonly => true, + timeout => $timeout, before => Exec['apt_updated'] } |