salt.pillar.http_json
A module that adds data to the Pillar structure retrieved by an http request
Configuring the HTTP_JSON ext_pillar
Set the following Salt config to setup http json result as external pillar source:
ext_pillar: - http_json: url: http://example.com/api/minion_id ::TODO:: username: username password: password
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_json: 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
Module Documentation
-
Read pillar data from HTTP response.
salt.pillar.http_json.ext_pillar(minion_id, pillar, url, with_grains=False)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/pillar/all/salt.pillar.http_json.html