From 4b49578757534b382066b45550b779febb679c95 Mon Sep 17 00:00:00 2001 From: Shimon Shtein Date: Wed, 2 Aug 2023 15:34:10 +0300 Subject: [PATCH] Fix hostname_match to send proper host object instead of string (#828) --- lib/foreman_inventory_upload/generators/fact_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman_inventory_upload/generators/fact_helpers.rb b/lib/foreman_inventory_upload/generators/fact_helpers.rb index aa347625..2a46083b 100644 --- a/lib/foreman_inventory_upload/generators/fact_helpers.rb +++ b/lib/foreman_inventory_upload/generators/fact_helpers.rb @@ -113,7 +113,7 @@ def hostname_match bash_hostname = `uname -n`.chomp foreman_hostname = ForemanRhCloud.foreman_host&.name if bash_hostname == foreman_hostname - fqdn(foreman_hostname) + fqdn(ForemanRhCloud.foreman_host) elsif Setting[:obfuscate_inventory_hostnames] obfuscate_fqdn(bash_hostname) else