From c07ab505c12428e50893451a38f7f1b38eeb0ada Mon Sep 17 00:00:00 2001 From: Edwin Hermans Date: Wed, 2 Oct 2013 14:24:30 +0200 Subject: [PATCH] add an updates_timeout option to apt::params (PR fix) --- README.md | 3 ++- manifests/init.pp | 5 ++++- manifests/update.pp | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 402d7ab..2ce5340 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,8 @@ The parameters for `apt` are not required in general and are predominantly for d proxy_port => '8080', purge_sources_list => false, purge_sources_list_d => false, - purge_preferences_d => false + purge_preferences_d => false, + update_timeout => undef } Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content. diff --git a/manifests/init.pp b/manifests/init.pp index 8f0c87b..b106ad4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,6 +12,8 @@ # true, Puppet will purge all unmanaged entries from sources.list # purge_sources_list_d - Accepts true or false. Defaults to false. If set # to true, Puppet will purge all unmanaged entries from sources.list.d +# update_timeout - Overrides the exec timeout in seconds for apt-get update. +# If not set defaults to Exec's default (300) # # Actions: # @@ -27,7 +29,8 @@ class apt( $proxy_port = '8080', $purge_sources_list = false, $purge_sources_list_d = false, - $purge_preferences_d = false + $purge_preferences_d = false, + $update_timeout = undef ) { include apt::params diff --git a/manifests/update.pp b/manifests/update.pp index e9b9ea9..ce0b78f 100644 --- a/manifests/update.pp +++ b/manifests/update.pp @@ -5,5 +5,6 @@ class apt::update { command => "${apt::params::provider} update", logoutput => 'on_failure', refreshonly => true, + timeout => $apt::update_timeout, } } -- 2.45.2