| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/saltstack/salt/lib/python3.10/site-packages/salt/tops/__pycache__/ |
Upload File : |
o
;j: � @ s@ d Z zddlZW n ey dZY nw dZdd� Zdd� ZdS )a
Use `Varstack <https://github.com/conversis/varstack>`_ to provide tops data
.. |varstack| replace:: **varstack**
This :ref:`master_tops <master-tops-system>` plugin provides access to
the |varstack| hierarchical yaml files, so you can user |varstack| as a full
:mod:`external node classifier <salt.tops.ext_nodes>` 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:
.. code-block:: yaml
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 <https://github.com/conversis/varstack/blob/master/README.md>`_ 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:
.. code-block:: yaml
---
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.
� N�varstackc C s t d u rdS tS )N)Fzvarstack not installed)r �__virtualname__� r r �J/opt/saltstack/salt/lib/python3.10/site-packages/salt/tops/varstack_top.py�__virtual__6 s r c K s6 t d d }| d }tj|d�}|�|�}d|d iS )zD
Query |varstack| for the top data (states of the minions).
Zmaster_topsr Zgrains)Zconfig_filename�baseZstates)Z__opts__r ZVarstackZevaluate)�kwargsZconfZ
__grains__Zvs_�retr r r �top: s
r
)�__doc__r �ImportErrorr r r
r r r r �<module> s ,�