Store key/value pairs in a CSV file
New in version 2016.11.0.
Example configuration:
ext_pillar:
- csv: /path/to/file.csv
# or
ext_pillar:
- csv:
path: /path/to/file.csv
namespace: 'subkey'
fieldnames:
- col1
- col2
- col2
The first column must be minion IDs and the first row must be dictionary keys. E.g.:
id | role | env |
---|---|---|
jerry | web | prod |
stuart | web | stage |
dave | web | qa |
phil | db | prod |
kevin | db | stage |
mike | db | qa |
Will produce the following Pillar values for a minion named "jerry":
{
'role': 'web',
'env': 'prod',
}
salt.pillar.csvpillar.
ext_pillar
(mid, pillar, path, idkey=u'id', namespace=None, fieldnames=None, restkey=None, restval=None, dialect=u'excel')¶Read a CSV into Pillar
Parameters: |
|
---|
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2018.3.0
salt.pillar.consul_pillar module