diff --git a/plugins/action/load_haproxy_config.py b/plugins/action/load_haproxy_config.py index 4277ce6..2d5b078 100644 --- a/plugins/action/load_haproxy_config.py +++ b/plugins/action/load_haproxy_config.py @@ -232,13 +232,13 @@ class ActionModule(ActionBase): "target": dns_target, "state": state, }) - - results['uptime_config'].append({ - "name": main_hostname, - "url": 'https://{0}.{1}/{2}'.format(main_hostname, domain, uptime_raw_config.get("endpoint", "")), - "protected": protected, - "state": uptime_raw_config.get("state", state) - }) + if not uptime_raw_config.get('skip', False): + results['uptime_config'].append({ + "name": '{0}.{1}'.format(main_hostname, domain), + "url": 'https://{0}.{1}/{2}'.format(main_hostname, domain, uptime_raw_config.get("endpoint", "")), + "protected": protected, + "state": uptime_raw_config.get("state", state) + }) for host in additionnal_hostname: @@ -266,10 +266,11 @@ class ActionModule(ActionBase): "target": this_dns_target, "state": this_state }) - results['uptime_config'].append({ - "name": host.get("hostname"), - "url": 'https://{0}/{1}'.format(full_domain, this_uptime_raw_config.get("endpoint", "")), - "protected": this_protected, - "state": this_uptime_raw_config.get("state", this_state) - }) + if not this_uptime_raw_config.get('skip', uptime_raw_config.get('skip', False)): + results['uptime_config'].append({ + "name": host.get("full_domain"), + "url": 'https://{0}/{1}'.format(full_domain, this_uptime_raw_config.get("endpoint", "")), + "protected": this_protected, + "state": this_uptime_raw_config.get("state", this_state) + }) return failed, err_msg, results \ No newline at end of file