.. _ansible.utils.consolidate_filter:
*************************
ansible.utils.consolidate
*************************
**Consolidate facts together on common attributes.**
Version added: 2.5.2
.. contents::
:local:
:depth: 1
Synopsis
--------
- This plugin presents collective structured data including all supplied facts grouping on common attributes mentioned.
- All other boolean parameter defaults to False unless parameters is explicitly mentioned.
- Using the parameters below- ``data_source|ansible.utils.consolidate(fail_missing_match_key=False``))
Parameters
----------
.. raw:: html
Parameter |
Choices/Defaults |
Configuration |
Comments |
data_source
list
/ elements=dictionary
/ required
|
|
|
This option represents a list of dictionaries to perform the operation on.
For example facts_source|ansible.utils.consolidate(fail_missing_match_key=False )), in this case facts_source represents this option.
|
|
data
raw
/ required
|
|
|
Specify facts data that gets consolidated.
|
|
match_key
string
/ required
|
|
|
Specify key to match on.
|
|
prefix
string
/ required
|
|
|
Specify the prefix with which the result set be created.
|
fail_duplicate
boolean
|
|
|
Fail if duplicate values for any key is found.
|
fail_missing_match_key
boolean
|
|
|
Fail if match_key is not found in a specific data set.
|
fail_missing_match_value
boolean
|
|
|
Fail if a keys to match in not same accross all data sets.
|