HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/saltmaster.cpython-310.pyc
o

-�_g	�@s6ddlZddlZddlmZmZGdd�dee�ZdS)�N)�Plugin�IndependentPluginc@s4eZdZdZdZdZdZdd�Zdd�Zd	d
�Z	dS)�
SaltMasterzSalt Master�
saltmaster)�sysmgmt)zsalt-masterzsalt-apicCsR|�d�r|�d�n|�d�|�d�|�d�|��|jgd�dd�dS)	N�all_logsz
/var/log/saltz/var/log/salt/masterz	/etc/saltz/etc/salt/pki/*/*.pem)zsalt-master --versionz#systemctl --full status salt-masterz systemctl --full status salt-apizsalt-key --list allz"salt-run jobs.list_jobs --out=yamlz%salt-run manage.list_state --out=yamlz)salt-run manage.list_not_state --out=yamlz!salt-run manage.joined --out=yaml�)�timeout)�
get_option�
add_copy_spec�add_forbidden_path�add_pillar_roots�add_cmd_output)�self�r�?/usr/lib/python3/dist-packages/sos/report/plugins/saltmaster.py�setups




	
�zSaltMaster.setupc
Cs�t�d�}d}|�|�r|�|�g}|D]9}t|ddd��(}zt�|��di��dg�}Wnty9g}Ynw|�|�Wd�n1sIwYq|�	|�dS)	z+ Collect pilliar_roots of all salt configs z/etc/salt/master.d/*confz/etc/salt/master�rzUTF-8)�encoding�pillar_roots�baseN)
�glob�path_exists�append�open�yaml�	safe_load�get�AttributeError�extendr)r�cfgs�main_cfg�all_pillar_roots�cfg�file�cfg_pillar_rootsrrrr
,s$


����
zSaltMaster.add_pillar_rootscCsd}d}|�d||�dS)Nz4(^\s+.*(pass|secret|(?<![A-z])key(?![A-z])).*:\ ).+$z\1******z/etc/salt/*)�do_path_regex_sub)r�regexp�substrrr�postprocBszSaltMaster.postprocN)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesrr
r)rrrrrsr)rr�sos.report.pluginsrrrrrrr�<module>s