salt.pillar.reclass_adapter
Use the "reclass" database as a Pillar source
This ext_pillar
plugin provides access to the reclass database, such that Pillar data for a specific minion are fetched using reclass.
You can find more information about reclass at http://reclass.pantsfullofunix.net.
To use the plugin, add it to the ext_pillar
list in the Salt master config and tell reclass by way of a few options how and where to find the inventory:
ext_pillar: - reclass: storage_type: yaml_fs inventory_base_uri: /srv/salt
This would cause reclass to read the inventory from YAML files in /srv/salt/nodes
and /srv/salt/classes
.
If you are also using reclass as master_tops
plugin, and you want to avoid having to specify the same information for both, use YAML anchors (take note of the differing data types for ext_pillar
and master_tops
):
reclass: &reclass storage_type: yaml_fs inventory_base_uri: /srv/salt reclass_source_path: ~/code/reclass ext_pillar: - reclass: *reclass master_tops: reclass: *reclass
If you want to run reclass from source, rather than installing it, you can either let the master know via the PYTHONPATH
environment variable, or by setting the configuration option, like in the example above.
-
Obtain the Pillar data from reclass for the given
minion_id
.
salt.pillar.reclass_adapter.ext_pillar(minion_id, pillar, **kwargs)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/pillar/all/salt.pillar.reclass_adapter.html