File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/tops/__pycache__/varstack_top.cpython-310.pyc
Back
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 ,�
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings