Project

General

Profile

Actions

Feature #15522

open

Support for array/multi-valued facts

Added by Dominic Cleal almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

It should be possible to store an array of multiple fact values for a single fact name, so array facts that are imported from config management tools can be stored with separate, queryable values, e.g. in the fact values list:

host.example.com    array_fact    value1
host.example.com array_fact value2
host.example.com array_fact value3

while currently the array is stringified:

host.example.com    array_fact    ["value1", "value2", "value3"]

@host.facts['array_fact'] should also return an array for templates. Smart variable matchers may also need support for matching against multiple values. Other bits of the UI and API that work with individual fact values will also need checking over (e.g. trending of fact values).

This will probably require a small schema change to permit multiple FactValues per host_id/fact_name_id.

Note this is different to #3339, which permitted nested facts (hashes) and #4528 which changes the Puppet fact importer to import nested facts.


Related issues 2 (0 open2 closed)

Related to Foreman - Feature #3339: Support for nested facts and specialised pluginsClosedMarek Hulán10/17/2013Actions
Related to Foreman - Feature #4528: Support Facter 2 structured factsClosedDominic Cleal03/03/2014Actions
Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Related to Feature #3339: Support for nested facts and specialised plugins added
Actions #2

Updated by Dominic Cleal almost 8 years ago

  • Related to Feature #4528: Support Facter 2 structured facts added
Actions

Also available in: Atom PDF