From: Julien Cristau Date: Sun, 6 Aug 2017 22:23:15 +0000 (-0400) Subject: Handle exceptions from reading fastly IP ranges X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5e2793b3b68c31ed087cebd44881d05c5d065485;p=mirror%2Fdsa-puppet.git Handle exceptions from reading fastly IP ranges --- diff --git a/modules/ferm/templates/defs.conf.erb b/modules/ferm/templates/defs.conf.erb index 25468cfab..229213920 100644 --- a/modules/ferm/templates/defs.conf.erb +++ b/modules/ferm/templates/defs.conf.erb @@ -75,8 +75,12 @@ <%= def getfastlyranges() + begin data = YAML.safe_load(File.open("/srv/puppet.debian.org/puppet-facts/fastly_ranges.yaml").read) - return data.addresses + return data.addresses + rescue + return [] + end end %> @def $HOST_FASTLY = (<%= getfastlyranges().join(' ') %>);