| 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/modules/__pycache__/ |
Upload File : |
o
;j. � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddl Zddl
mZ dddddd�Ze�
d�Zdd � Zd
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� ZdS )z,
Manage the information in the aliases file
� N)�SaltInvocationError�txtZyaml)�rm_alias�
has_target�
get_target�
set_target�list_aliasesz"([^:#]*)\s*:?\s*([^#]*?)(\s+#.*|$)c C s t j�td d��S )z9
Return the path to the appropriate aliases file
z
config.optionzaliases.file)�os�path�realpath�__salt__� r
r
�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/aliases.py�__get_aliases_filename s r c C s� t � } g }tj�| �s
|S tjj�| d��.}|D ]"}tjj� |�}t
�|�}|r0|�|�
� � q|�dd|�� f� qW d � |S 1 sFw Y |S )z�
Parse the aliases file, and return a list of line components:
[
(alias1, target1, comment1),
(alias2, target2, comment2),
]
�rN)r r r
�isfile�salt�utils�filesZfopenZstringutilsZ
to_unicode�
__ALIAS_RE�match�append�groups�strip)�afn�retZifile�liner r
r
r �__parse_aliases"