Allow post_puppetdb to fail to post facts
This prevents failure of the module when puppetdb has a belly ache. Change-Id: Ief2dbb740ed358d977c3656feda1f3932d5d5e08
This commit is contained in:
parent
0909fa99f7
commit
1f32232b7f
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user