Feature #15522
openSupport for array/multi-valued facts
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.
Updated by Dominic Cleal over 8 years ago
- Related to Feature #3339: Support for nested facts and specialised plugins added
Updated by Dominic Cleal over 8 years ago
- Related to Feature #4528: Support Facter 2 structured facts added