403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/cloudinit/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/cloudinit/config/__pycache__/cc_salt_minion.cpython-36.pyc
3

��b��@sHdZddlZddlmZmZmZddlmZGdd�de�Z	dd�Z
dS)	a�
Salt Minion
-----------
**Summary:** set up and run salt minion

This module installs, configures and starts salt minion. If the ``salt_minion``
key is present in the config parts, then salt minion will be installed and
started. Configuration for salt minion can be specified in the ``conf`` key
under ``salt_minion``. Any conf values present there will be assigned in
``/etc/salt/minion``. The public and private keys to use for salt minion can be
specified with ``public_key`` and ``private_key`` respectively. Optionally if
you have a custom package name, service name or config directory you can
specify them with ``pkg_name``, ``service_name`` and ``config_dir``.

**Internal name:** ``cc_salt_minion``

**Module frequency:** per instance

**Supported distros:** all

**Config keys**::

    salt_minion:
        pkg_name: 'salt-minion'
        service_name: 'salt-minion'
        config_dir: '/etc/salt'
        conf:
            master: salt.example.com
        grains:
            role:
                - web
        public_key: |
            ------BEGIN PUBLIC KEY-------
            <key data>
            ------END PUBLIC KEY-------
        private_key: |
            ------BEGIN PRIVATE KEY------
            <key data>
            ------END PRIVATE KEY-------
�N)�safeyaml�subp�util)�	bsd_utilsc@seZdZdZdd�ZdS)�
SaltConstantsz>
    defines default distribution specific salt variables
    cCshtj�rd|_d|_d|_nd|_d|_d|_tj|d|j�|_tj|d|j�|_tj|d|j�|_dS)	Nzpy-salt�salt_minionz/usr/local/etc/saltzsalt-minionz	/etc/salt�pkg_nameZ
config_dirZservice_name)rZ
is_FreeBSDr�srv_name�conf_dirZget_cfg_option_str)�self�cfg�r
�$/usr/lib/python3.6/cc_salt_minion.py�__init__<szSaltConstants.__init__N)�__name__�
__module__�__qualname__�__doc__rr
r
r
rr7srcCs�d|kr|jd|�dS|d}t|d�}|jj|j�tj|j�d|krxtj	j
|jd�}tj|j
d��}tj||�d|kr�tj	j
|jd�}	tj|j
d��}
tj|	|
�d|ko�d|k�rRtj	j
|jd	�}tj	j|�s�tj	j
|jd
�}|j
d|�}tjd��Ltj|�tj	j
|d
�}
tj	j
|d�}tj|
|d�tj||d�WdQRX|jjdk�rltjdd�tjd|jdgdd�dS)Nrz?Skipping module named %s, no 'salt_minion' key in configuration)rZconfZminionZgrainsZ
public_keyZprivate_keyz
pki/minionZpki�pki_dir�?z
minion.pubz
minion.pemZfreebsdZsalt_minion_enableZYESZserviceZrestartF)Zcapture)�debugrZdistroZinstall_packagesrrZ
ensure_dirr
�os�path�joinr�dumps�getZ
write_file�isdir�umaskZosfamilyrZset_rc_config_valuerr	)�namerZcloud�logZ_argsZs_cfg�constZ
minion_configZminion_dataZ
grains_configZgrains_dataZpki_dir_defaultrZpub_nameZpem_namer
r
r�handleSs>

r!)rrZ	cloudinitrrrZcloudinit.distrosr�objectrr!r
r
r
r�<module>,s


Youez - 2016 - github.com/yon3zu
LinuXploit