diff --git a/plugins/action/load_haproxy_config.py b/plugins/action/load_haproxy_config.py index 78b5d5b..883fbde 100644 --- a/plugins/action/load_haproxy_config.py +++ b/plugins/action/load_haproxy_config.py @@ -249,9 +249,10 @@ class ActionModule(ActionBase): this_protected = host.get('protected', protected) this_state = host.get('state', state) this_uptime_raw_config = host.get("uptime", dict()) + full_domain = '{0}.{1}'.format(host.get("hostname"), this_domain) if host.get("hostname") else this_domain if this_state == "present": - 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: results['protected_domain'].append(full_domain)