Fix if additional host is ""
This commit is contained in:
parent
d754a8f02a
commit
753e744d17
@ -232,9 +232,10 @@ class ActionModule(ActionBase):
|
|||||||
this_state = host.get('state', state)
|
this_state = host.get('state', state)
|
||||||
|
|
||||||
if this_state == "present":
|
if this_state == "present":
|
||||||
results['domain_maping'].append('{0}.{1} {2}'.format(host.get("hostname"), this_domain, backend.get("name")))
|
full_domain = '{0}.{1}'.format(host.get("hostname"), this_domain) if host.get("hostname") else this_domain
|
||||||
|
results['domain_maping'].append('{0} {2}'.format(full_domain, this_domain, backend.get("name")))
|
||||||
if this_protected:
|
if this_protected:
|
||||||
results['protected_domain'].append('{0}.{1}'.format(host.get("hostname"), this_domain))
|
results['protected_domain'].append(full_domain)
|
||||||
|
|
||||||
if not this_dns.get("skip", dns.get("skip", False)):
|
if not this_dns.get("skip", dns.get("skip", False)):
|
||||||
if not this_dns_provider in results['dns_hostnames']:
|
if not this_dns_provider in results['dns_hostnames']:
|
||||||
|
Loading…
Reference in New Issue
Block a user