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',
}
Read a CSV into Pillar