Change name and add skip for uptime
This commit is contained in:
parent
7d49ce1ce3
commit
5165f9d704
@ -232,13 +232,13 @@ class ActionModule(ActionBase):
|
|||||||
"target": dns_target,
|
"target": dns_target,
|
||||||
"state": state,
|
"state": state,
|
||||||
})
|
})
|
||||||
|
if not uptime_raw_config.get('skip', False):
|
||||||
results['uptime_config'].append({
|
results['uptime_config'].append({
|
||||||
"name": main_hostname,
|
"name": '{0}.{1}'.format(main_hostname, domain),
|
||||||
"url": 'https://{0}.{1}/{2}'.format(main_hostname, domain, uptime_raw_config.get("endpoint", "")),
|
"url": 'https://{0}.{1}/{2}'.format(main_hostname, domain, uptime_raw_config.get("endpoint", "")),
|
||||||
"protected": protected,
|
"protected": protected,
|
||||||
"state": uptime_raw_config.get("state", state)
|
"state": uptime_raw_config.get("state", state)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
for host in additionnal_hostname:
|
for host in additionnal_hostname:
|
||||||
@ -266,10 +266,11 @@ class ActionModule(ActionBase):
|
|||||||
"target": this_dns_target,
|
"target": this_dns_target,
|
||||||
"state": this_state
|
"state": this_state
|
||||||
})
|
})
|
||||||
results['uptime_config'].append({
|
if not this_uptime_raw_config.get('skip', uptime_raw_config.get('skip', False)):
|
||||||
"name": host.get("hostname"),
|
results['uptime_config'].append({
|
||||||
"url": 'https://{0}/{1}'.format(full_domain, this_uptime_raw_config.get("endpoint", "")),
|
"name": host.get("full_domain"),
|
||||||
"protected": this_protected,
|
"url": 'https://{0}/{1}'.format(full_domain, this_uptime_raw_config.get("endpoint", "")),
|
||||||
"state": this_uptime_raw_config.get("state", this_state)
|
"protected": this_protected,
|
||||||
})
|
"state": this_uptime_raw_config.get("state", this_state)
|
||||||
|
})
|
||||||
return failed, err_msg, results
|
return failed, err_msg, results
|
Loading…
Reference in New Issue
Block a user