From 5e2793b3b68c31ed087cebd44881d05c5d065485 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 6 Aug 2017 18:23:15 -0400 Subject: [PATCH] Handle exceptions from reading fastly IP ranges --- modules/ferm/templates/defs.conf.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(' ') %>); -- 2.20.1