]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Retry package installs
authorErik Dalén <dalen@spotify.com>
Thu, 14 Nov 2013 10:02:18 +0000 (11:02 +0100)
committerErik Dalén <dalen@spotify.com>
Thu, 14 Nov 2013 10:02:18 +0000 (11:02 +0100)
Sometimes package installs can fail to aquire the lock file, so retry
the command in that case.

manifests/source.pp

index 713c7e933ac1f75263fdffd09c7a056eb3161538..bc93ad9d5711c42578b7980dd3ee46a9e7cf69fa 100644 (file)
@@ -61,6 +61,8 @@ define apt::source(
       command     => "${provider} -y install ${required_packages}",
       logoutput   => 'on_failure',
       refreshonly => true,
+      tries       => 3,
+      try_sleep   => 1,
       subscribe   => File["${name}.list"],
       before      => Exec['apt_update'],
     }