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