salt.tops.varstack_top
Use Varstack to provide tops data
This master_tops plugin provides access to the varstack hierarchical yaml files, so you can user varstack as a full external node classifier
and store state information (top data) in it.
Configuring Varstack
To use varstack as a master top external node classifier, install varstack as documented. Then, add to your master's configuration:
master_tops: varstack: /path/to/the/config/file/varstack.yaml
Varstack will then use /path/to/the/config/file/varstack.yaml (usually /etc/varstack.yaml) to determine which configuration data to return as adapter information. From there you can take a look at the README of varstack to learn how this file is evaluated. The ENC part will just return the 'states' dictionary for the node.
Ie, if my.fqdn.yaml file contains:
--- states: - sudo - openssh - apache - salt.minion
these will be returned as {'base': ['sudo', 'openssh', 'apache', 'salt.minion']} and managed by salt as if given from a top.sls file.
-
Query varstack for the top data (states of the minions).
salt.tops.varstack_top.top(**kwargs)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/tops/all/salt.tops.varstack_top.html