diff --git a/src/risotto/machine.py b/src/risotto/machine.py index 4e915f9..7876ebd 100644 --- a/src/risotto/machine.py +++ b/src/risotto/machine.py @@ -296,7 +296,7 @@ class Loader: zones_name = server_datas['zones_name'] values = [f'{server_name}.{self.zones[zone_name]["domain_name"]}' for zone_name in zones_name] if server_datas['applicationservice'] == 'tls': - true_host_name = f'{server_name}.{self.zones[list(self.zones)[0]]["domain_name"]}' + true_host_name = f'{server_name}.{self.zones[server_datas["zones_name"][0]]["domain_name"]}' else: true_host_name = values[0] cfg['risotto_globals'][true_host_name] = {'global:host_name': host_name,