From ed9ff61987a18529e592f2d60a33efa702d6b30a Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Thu, 5 Oct 2023 11:00:26 +0000 Subject: [PATCH] Refs #36715 - Update fact_names description for facts_hash --- app/models/host/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/host/base.rb b/app/models/host/base.rb index f406558bf1a..bc1e7305f5c 100644 --- a/app/models/host/base.rb +++ b/app/models/host/base.rb @@ -214,7 +214,7 @@ def set_comment(parser) desc 'Note that available facts depend on what facts have been uploaded to Foreman, typical sources are Puppet facter, subscription manager etc. The facts can be out of date, this macro only provides access to the value stored in the database.' - optional :fact_names, Array, desc: 'A list of fact names to return. If empty all facts are returned' + list :fact_names, desc: 'A list of fact names to return. If empty all facts are returned' returns Hash, desc: 'A hash of facts, keys are fact names, values are fact values' example '@host.facts # => { "hardwareisa"=>"x86_64", "kernel"=>"Linux", "virtual"=>"physical", ... }', desc: 'Getting all host facts' example '@host.facts["uptime"] # => "30 days"', desc: 'Getting specific fact value, +uptime+ in this case'