From 1f32232b7f076f396429dc6dcf43313720025942 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Tue, 23 Feb 2016 13:22:56 -0800 Subject: [PATCH] Allow post_puppetdb to fail to post facts This prevents failure of the module when puppetdb has a belly ache. Change-Id: Ief2dbb740ed358d977c3656feda1f3932d5d5e08 --- library/puppet_post_puppetdb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/library/puppet_post_puppetdb b/library/puppet_post_puppetdb index 0c3edca..0d6762a 100644 --- a/library/puppet_post_puppetdb +++ b/library/puppet_post_puppetdb @@ -113,11 +113,6 @@ def main(): with open(payload_dump, 'w') as f: f.write(json.dumps(payload)) r = requests.post(endpoint, json=payload, **requests_kwargs) - if r.status_code != 200: - module.fail_json( - rc=r.status_code, - msg="Failed to post facts to {puppetdb}".format( - puppetdb=p['puppetdb'])) log_data = json.load(open(p['logfile'], 'r')) r = requests.post(endpoint, json=log_data, **requests_kwargs)