A module that adds data to the Pillar structure retrieved by an http request
Set the following Salt config to setup an http endpoint as the external pillar source:
ext_pillar:
- http_yaml:
url: http://example.com/api/minion_id
username: username
password: password
header_dict: None
auth: None
You can pass additional parameters, they will be added to the http.query call
utils.http.query function
:
If the with_grains parameter is set, grain keys wrapped in can be provided (wrapped in <> brackets) in the url in order to populate pillar data based on the grain value.
ext_pillar:
- http_yaml:
url: http://example.com/api/<nodename>
with_grains: True
Changed in version 2018.3.0: If %s is present in the url, it will be automatically replaced by the minion_id:
ext_pillar:
- http_json:
url: http://example.com/api/%s
Read pillar data from HTTP response.
A dictionary of the pillar data to add.