Store key/value pairs in a CSV file
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='id', namespace=None, fieldnames=None, restkey=None, restval=None, dialect='excel')¶Read a CSV into Pillar
Parameters: |
---|