From 4ce56e49155d95bf7c79b14f1811cec909398782 Mon Sep 17 00:00:00 2001 From: Mikk Romulus Date: Tue, 20 Feb 2024 13:45:10 +0200 Subject: [PATCH] fix: hostname generation Hostnames should not contain _ characters, use - instead --- app/calculation/hostname_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/calculation/hostname_generator.rb b/app/calculation/hostname_generator.rb index 4eb4fa3b..70fd76e1 100644 --- a/app/calculation/hostname_generator.rb +++ b/app/calculation/hostname_generator.rb @@ -11,7 +11,7 @@ def result hostname_sequence_suffix, hostname_team_suffix ].compact - hostname = "#{subject.hostname}#{sequences.join('_')}" + hostname = "#{subject.hostname}#{sequences.join('-')}" domain = nic&.network&.full_domain.to_s.gsub(/#+/, '{{ team_nr_str }}') Struct.new(:hostname, :domain, :fqdn).new(