403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/modules/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/modules/__pycache__/apt_repository.cpython-311.pyc
�

���c�q���ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlmZddlmZmZmZddlmZdd	lmZdd
lmZ	ddlZddlZddl m!Z"e"j#��Z!dZ$n#e%$r
dxZxZxZ"Z!dZ$YnwxYwgd
�Z&dZ'dZ(d�Z)Gd�de*��Z+Gd�de,��Z-Gd�de-��Z.d�Z/d�Z0e1dkre0��dSdS)�)�absolute_import�division�print_functiona�
---
module: apt_repository
short_description: Add and remove APT repositories
description:
    - Add or remove an APT repositories in Ubuntu and Debian.
extends_documentation_fragment: action_common_attributes
attributes:
    check_mode:
        support: full
    diff_mode:
        support: full
    platform:
        platforms: debian
notes:
    - This module supports Debian Squeeze (version 6) as well as its successors and derivatives.
options:
    repo:
        description:
            - A source string for the repository.
        type: str
        required: true
    state:
        description:
            - A source string state.
        type: str
        choices: [ absent, present ]
        default: "present"
    mode:
        description:
            - The octal mode for newly created files in sources.list.d.
            - Default is what system uses (probably 0644).
        type: raw
        version_added: "1.6"
    update_cache:
        description:
            - Run the equivalent of C(apt-get update) when a change occurs.  Cache updates are run after making changes.
        type: bool
        default: "yes"
        aliases: [ update-cache ]
    update_cache_retries:
        description:
        - Amount of retries if the cache update fails. Also see I(update_cache_retry_max_delay).
        type: int
        default: 5
        version_added: '2.10'
    update_cache_retry_max_delay:
        description:
        - Use an exponential backoff delay for each retry (see I(update_cache_retries)) up to this max delay in seconds.
        type: int
        default: 12
        version_added: '2.10'
    validate_certs:
        description:
            - If C(false), SSL certificates for the target repo will not be validated. This should only be used
              on personally controlled sites using self-signed certificates.
        type: bool
        default: 'yes'
        version_added: '1.8'
    filename:
        description:
            - Sets the name of the source list file in sources.list.d.
              Defaults to a file name based on the repository source url.
              The .list extension will be automatically added.
        type: str
        version_added: '2.1'
    codename:
        description:
            - Override the distribution codename to use for PPA repositories.
              Should usually only be set when working with a PPA on
              a non-Ubuntu target (for example, Debian or Mint).
        type: str
        version_added: '2.3'
    install_python_apt:
        description:
            - Whether to automatically try to install the Python apt library or not, if it is not already installed.
              Without this library, the module does not work.
            - Runs C(apt-get install python-apt) for Python 2, and C(apt-get install python3-apt) for Python 3.
            - Only works with the system Python 2 or Python 3. If you are using a Python on the remote that is not
               the system Python, set I(install_python_apt=false) and ensure that the Python apt library
               for your Python version is installed some other way.
        type: bool
        default: true
author:
- Alexander Saltanov (@sashka)
version_added: "0.7"
requirements:
   - python-apt (python 2)
   - python3-apt (python 3)
   - apt-key or gpg
a!
- name: Add specified repository into sources list
  ansible.builtin.apt_repository:
    repo: deb http://archive.canonical.com/ubuntu hardy partner
    state: present

- name: Add specified repository into sources list using specified filename
  ansible.builtin.apt_repository:
    repo: deb http://dl.google.com/linux/chrome/deb/ stable main
    state: present
    filename: google-chrome

- name: Add source repository into sources list
  ansible.builtin.apt_repository:
    repo: deb-src http://archive.canonical.com/ubuntu hardy partner
    state: present

- name: Remove specified repository from sources list
  ansible.builtin.apt_repository:
    repo: deb http://archive.canonical.com/ubuntu hardy partner
    state: absent

- name: Add nginx stable repository from PPA and install its signing key on Ubuntu target
  ansible.builtin.apt_repository:
    repo: ppa:nginx/stable

- name: Add nginx stable repository from PPA and install its signing key on Debian target
  ansible.builtin.apt_repository:
    repo: 'ppa:nginx/stable'
    codename: trusty

- name: One way to avoid apt_key once it is removed from your distro
  block:
    - name: somerepo |no apt key
      ansible.builtin.get_url:
        url: https://download.example.com/linux/ubuntu/gpg
        dest: /etc/apt/trusted.gpg.d/somerepo.asc

    - name: somerepo | apt source
      ansible.builtin.apt_repository:
        repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/myrepo.asc] https://download.example.com/linux/ubuntu {{ ansible_distribution_release }} stable"
        state: present
�#N)�
AnsibleModule)�
has_respawned�probe_interpreters_for_module�respawn_module)�	to_native)�PY3)�	fetch_urlTF)z/etc/apt/keyringsz/etc/apt/trusted.gpg.dz/usr/share/keyringsi�)�debzdeb-srcc���|js�|�d��}|r�|�|dg��\}}}|dkr/|�d|�d|����d����|�|d|d	d
g��\}}}|dkr3|�d|�d|����d����dSdSdS|�d|z���dS)Nzapt-get�updaterzFailed to auto-install z. Error was: '�'��msg�installz-yz-qz&%s must be installed to use check mode)�
check_mode�get_bin_path�run_command�	fail_json�strip)�module�apt_pkg_name�apt_get_path�rc�so�ses      �C/usr/lib/python3.11/site-packages/ansible/modules/apt_repository.py�install_python_aptr!�s0����
V��*�*�9�5�5���	p��+�+�\�8�,D�E�E�J�B��B��Q�w�w�� � � �Ua�Ua�Ua�ce�ck�ck�cm�cm�cm�cm�%n� �o�o�o��+�+�\�9�l�TX�Z^�,_�`�`�J�B��B��Q�w�w�� � � �Ua�Ua�Ua�ce�ck�ck�cm�cm�cm�cm�%n� �o�o�o�o�o�
	p�	p�
�w�	���E��T��U�U�U�U�U�c��eZdZdS)�
InvalidSourceN)�__name__�
__module__�__qualname__�r"r r$r$�s�������Dr"r$c��eZdZd�Zd�Zd�Zd�Zdd�Zed���Z	ed���Z
d	�Zd
�Zd�Z
d�Zdd�Zd�Zdd�Zd�Zd�Zd
S)�SourcesListc�|�||_i|_t��|_|�d��|_tj�|j��r|�	|j��tjd|�d��z��D]}|�	|���dS)NzDir::Etc::sourcelistz	%s/*.list�Dir::Etc::sourceparts)
r�files�set�	new_repos�
_apt_cfg_file�default_file�os�path�isfile�load�glob�iglob�_apt_cfg_dir)�selfr�files   r �__init__zSourcesList.__init__�s��������
������ �.�.�/E�F�F����7�>�>�$�+�,�,�	)��I�I�d�'�(�(�(��J�{�T�->�->�?V�-W�-W�W�X�X�	�	�D��I�I�d�O�O�O�O�	�	r"c#�tK�|j���D]\}}|D]\}}}}}|r	|||||fV���dS)zeSimple iterator to go over all sources. Empty, non-source, and other not valid lines will be skipped.N)r-�items)r9r:�sources�n�valid�enabled�source�comments        r �__iter__zSourcesList.__iter__�sp����!�Z�-�-�/�/�	<�	<�M�D�'�6=�
<�
<�2��5�'�6�7��<���7�F�G�;�;�;�;��
<�	<�	<r"c��d|vr|Stj�tj�|�d��|����S)N�/r,)r2r3�abspath�joinr8)r9�filenames  r �_expand_pathzSourcesList._expand_path�sD���(�?�?��O��7�?�?�2�7�<�<��0A�0A�BY�0Z�0Z�\d�#e�#e�f�f�fr"c�"���fd�}d�}tjdd|��}tjdd|��}d�|���D��}||d��|d<d|d	�|dd
�����zS)Nc����jjd}|�|Sd�tjdd|�������S)NrI�_z[^a-zA-Z0-9]� )r�paramsrH�re�sub�split)�srIr9s  �r �_cleanup_filenamez8SourcesList._suggest_filename.<locals>._cleanup_filename�sI����{�)�*�5�H��#����8�8�B�F�>�3��:�:�@�@�B�B�C�C�Cr"c�J�d|vr|�dd��}|d}|S)N�@����)rR)rSs r �_strip_username_passwordz?SourcesList._suggest_filename.<locals>._strip_username_password�s*���a�x�x��G�G�C��O�O���b�E���Hr"z
\[[^\]]+\]�z\w+://c�$�g|]
}|tv�|��Sr()�VALID_SOURCE_TYPES)�.0�parts  r �
<listcomp>z1SourcesList._suggest_filename.<locals>.<listcomp>�s#��Q�Q�Q�$�$�>P�2P�2P��2P�2P�2Pr"rz%s.listrNrW)rPrQrRrH)r9�linerTrY�partss`    r �_suggest_filenamezSourcesList._suggest_filename�s����	D�	D�	D�	D�	D�	�	�	��v�m�R��.�.���v�i��T�*�*��R�Q�$�*�*�,�,�Q�Q�Q��,�+�E�!�H�5�5��a���,�,�S�X�X�e�B�Q�B�i�-@�-@�A�A�A�Ar"Fc���d}d}d}d}|���}|�d��rd}|dd�}|�d��}|dkr)||dzd����}|d|�}|���}|r:|���}|dtvrd}d�|��}|r|r|st
|���||||fS)NFTrZrrWrrN)r�
startswith�findrRr\rHr$)	r9r`�raise_if_invalid_or_disabledr@rArBrC�i�chunkss	         r �_parsezSourcesList._parses
�����������z�z�|�|���?�?�3���	��G�����8�D�
�I�I�c�N�N���q�5�5��1�q�5�6�6�l�(�(�*�*�G�����8�D��������	*��\�\�^�^�F��a�y�.�.�.������&�)�)��'�	&��	&�g�	&���%�%�%��g�v�w�.�.r"c��	tj�|��}n/#t$r"tj�|��}YnwxYw|S�zJ
        Wrapper for `apt_pkg` module for running with Python 2.5
        )�apt_pkg�config�	find_file�AttributeError�Config�FindFile)�filespec�results  r r0zSourcesList._apt_cfg_file#sW��
	7��^�-�-�h�7�7�F�F���	7�	7�	7��^�,�,�X�6�6�F�F�F�	7�����
��"�)A�
Ac��	tj�|��}n/#t$r"tj�|��}YnwxYw|Srk)rlrm�find_dirrorp�FindDir)�dirspecrss  r r8zSourcesList._apt_cfg_dir.sW��
	5��^�,�,�W�5�5�F�F���	5�	5�	5��^�+�+�G�4�4�F�F�F�	5�����
rtc���g}t|d��}t|��D]9\}}|�|��\}}}}	|�|||||	f���:||j|<dS)N�r)�open�	enumerateri�appendr-)
r9r:�group�fr?r`r@rArBrCs
          r r5zSourcesList.load9sy������s�O�O�� ��|�|�	?�	?�G�A�t�.2�k�k�$�.?�.?�+�E�7�F�G��L�L�!�U�G�V�W�=�>�>�>�>� ��
�4���r"c��t|j�����D�]�\}}|�rktj�|��\}}	tj|��nc#t$rV}tj�|��s-|j	�
d|�dt|������Yd}~nd}~wwxYw	tj
d|z|���\}}nL#ttf$r8}|j	�
d|�dt|�������Yd}~nd}~wwxYwtj|d��}	|D]�\}
}}}
}g}|s|�d	��|�|
��|r*|�d
��|�|��|�d��d�|��}	|	�|����#t$r8}|j	�
d
|�dt|�������Yd}~��d}~wwxYw|j	�||��||jvrA|j	j�dt.��}|j	�||d����t|j|=tj�|��rtj|�����dS)NzFailed to create directory �: z.%s-)�prefix�dirzUnable to create temp file at "z" for apt source: r�w�# � # �
rZzFailed to write to file �modeF)�listr-r=r2r3rR�makedirs�OSError�isdirrrr�tempfile�mkstemp�IOError�fdopenr}rH�write�atomic_mover/rO�get�DEFAULT_SOURCES_PERM�set_mode_if_different�exists�remove)r9rIr>�d�fn�ex�fd�tmp_path�err?r@rArBrCrhr`�	this_modes                  r �savezSourcesList.saveAs&��!%�d�j�&6�&6�&8�&8�!9�!9�'	(�'	(��H�g��&
(���
�
�h�/�/���2�h��K��N�N�N�N���h�h�h��7�=�=��+�+�h���-�-�-�UV�UV�UV�Xa�bd�Xe�Xe�Xe�.f�g�g�g����������h����{�#+�#3�6�B�;�A�#N�#N�#N�L�B������)�{�{�{��K�)�)�)�ij�ij�ij�lu�vw�lx�lx�lx�.y�)�z�z�z�z�z�z�z�z�����{�����I�b�#�&�&��:A�p�p�6�A�u�g�v�w��F�"�,��
�
�d�+�+�+��M�M�&�)�)�)��/��
�
�e�,�,�,��
�
�g�.�.�.��M�M�$�'�'�'��7�7�6�?�?�D�p�����
�
�
�
��"�p�p�p���-�-�-�V^�V^�V^�`i�jl�`m�`m�`m�2n�-�o�o�o�o�o�o�o�o�����p������'�'��(�;�;�;��t�~�-�-� $�� 2� 6� 6�v�?S� T� T�I��K�5�5�h�	�5�Q�Q�Q���J�x�(��7�>�>�(�+�+�(��I�h�'�'�'��O'	(�'	(sI�A(�(
C�2AC�C�C)�)D2�:.D-�-D2�G/�/
H1�9.H,�,H1c���i}|j���D]�\}}|r�g}|D]�\}}}}}	g}
|s|
�d��|
�|��|	r*|
�d��|
�|	��|
�d��|�d�|
������d�|��||<��|S)Nr�r�r�rZ)r-r=r}rH)r9�
dumpstructrIr>�linesr?r@rArBrCrhs           r �dumpzSourcesList.dumpks����
�!%��!1�!1�!3�!3�
	6�
	6��H�g��
6���:A�	2�	2�6�A�u�g�v�w��F�"�,��
�
�d�+�+�+��M�M�&�)�)�)��/��
�
�e�,�,�,��
�
�g�.�.�.��M�M�$�'�'�'��L�L�������1�1�1�1�')�w�w�u�~�~�
�8�$���r"c��|�|S|S�Nr()r9�new�olds   r �_choicezSourcesList._choice}s���;��J��
r"Nc���|j||dd�\}}}}	|||�||��|�||��|�||	��f|j||<dS)z�
        This function to be used with iterator, so we don't care of invalid sources.
        If source, enabled, or comment is None, original value from line ``n`` will be preserved.
        rWN)r-r�)
r9r:r?rArBrCr@�enabled_old�
source_old�comment_olds
          r �modifyzSourcesList.modify�s���
7;�j��6F�q�6I�!�"�"�6M�3��{�J�� �%����g�{�)K�)K�T�\�\�Z`�bl�Mm�Mm�os�o{�o{�}D�FQ�pR�pR�S��
�4�����r"c��|j�d|�d|�d|����d}|D](\}}}}}	||kr|�||d���d}�)|s�|�|j}n|�|��}||jvr
g|j|<|j|}
|
�t|
��dd||f��|j�	|��dSdS)Nzading source file: z | FT)rA)
r�logr�r1rJr-r}�lenr/�add)r9�
source_new�comment_newr:�foundrIr?rArBrCr-s           r �_add_valid_sourcezSourcesList._add_valid_source�s
��	
�����Z�Z�Z����VZ�VZ�[�\�\�\���59�	�	�1�H�a��&�'���#�#����H�a���6�6�6�����	%��|��(����(�(��.�.���4�:�%�%�#%��
�4� ��J�t�$�E��L�L�#�e�*�*�d�D�*�k�J�K�K�K��N���t�$�$�$�$�$�	%�	%r"rZc��|�|d���d}|�|||p|�|�����dS)NT�rf�)r:)rir�rb)r9r`rCr:rBs     r �
add_sourcezSourcesList.add_source�sS�����T���E�E�a�H��	
���v�w�T�5[�T�=S�=S�TZ�=[�=[��\�\�\�\�\r"c�l�|D]0\}}}}}||kr"|r |j|�|���1dSr�)r-�pop)r9rBrIr?rA�srcrCs       r �_remove_valid_sourcez SourcesList._remove_valid_source�sO��26�	,�	,�.�H�a��#�w���}�}��}��
�8�$�(�(��+�+�+��	,�	,r"c�j�|�|d���d}|�|��dS)NTr�r�)rir��r9r`rBs   r �
remove_sourcezSourcesList.remove_source�s6�����T���E�E�a�H���!�!�&�)�)�)�)�)r")F)NNN�rZN)r%r&r'r;rDrJrbri�staticmethodr0r8r5r�r�r�r�r�r�r�r�r(r"r r*r*�s:������
�
�
�<�<�<�g�g�g�B�B�B�2/�/�/�/�>����\������\��!�!�!�((�((�((�T���$���
S�S�S�S�%�%�%�.]�]�]�]�,�,�,�*�*�*�*�*r"r*c�f��eZdZdZ�fd�Zd
d�Zd�Zd�Zd�Zd�Z	dd
�Z
d�Zed���Z
�xZS)�UbuntuSourcesListz-https://launchpad.net/api/1.0/~%s/+archive/%sc���||_|jdptj|_t	t
|���|��|j�dd���|_|j�dd���|_	|js$|j	s|j�
d���dSdSdS)N�codenamezapt-keyF)�required�gpgzDEither apt-key or gpg binary is required, but neither could be foundr)rrO�distror��superr�r;r�apt_key_bin�gpg_binr)r9r�	__class__s  �r r;zUbuntuSourcesList.__init__�s��������
�j�1�D�V�_��
�
���&�&�/�/��7�7�7��;�3�3�I��3�N�N����{�/�/���/�F�F�����	n���	n��K�!�!�&l�!�m�m�m�m�m�	n�	n�	n�	nr"Nc�*�t|j��Sr�)r�r)r9�memos  r �__deepcopy__zUbuntuSourcesList.__deepcopy__�s�� ���-�-�-r"c�4�|j||fz}td���}t|j||���\}}|ddkr$|j�d|dz���tjt|�������S)	Nzapplication/json)�Accept)�headers�status��z.failed to fetch PPA information, error was: %srr)	�LP_API�dictr
rr�json�loadsr�read)r9�
owner_name�ppa_name�lp_apir��response�infos       r �
_get_ppa_infozUbuntuSourcesList._get_ppa_info�s�����
�H�5�5���0�1�1�1��"�4�;���H�H�H���$���>�S� � ��K�!�!�&V�Y]�^c�Yd�&d�!�e�e�e��z�)�H�M�M�O�O�4�4�5�5�5r"c��|�d��d}|�d��d}	|�d��d}n#t$rd}YnwxYwd|�d|�d|j�d�}|||fS)	N�:rWrFr�ppazdeb http://ppa.launchpad.net/z/ubuntu z main)rR�
IndexErrorr�)r9r3r��	ppa_ownerr�r`s      r �_expand_ppazUbuntuSourcesList._expand_ppa�s����j�j��o�o�a� ���I�I�c�N�N�1�%�	�	��y�y��~�~�a�(�H�H���	�	�	��H�H�H�	�����GP�i�i�QY�QY�QY�[_�[h�[h�[h�i���Y��(�(s�A�A#�"A#c��|jr<|j�|jd|gd���\}}}t|��dk}n|�|��}|S)N�exportT)�check_rcr)r�rrr��_gpg_key_exists)r9�key_fingerprintr�out�errr�s      r �_key_already_existsz%UbuntuSourcesList._key_already_exists�sb����	:��;�2�2�D�4D�h�P_�3`�ko�2�p�p�L�B��S���H�H��M�E�E��(�(��9�9�E��r"c
��	�d}dg}tD]5�	|��	fd�tj�	��D�����6|D]�}tj�|��rv	|j�|jd|g��\}}}nF#ttf$r2}|�d|�dt|������Yd}~��d}~wwxYw||vrd}n��|S)NFz/etc/apt/trusted.gpgc�z��g|]7}|�d���tj��|����8S)�.)rdr2r3rH)r]�x�	other_dirs  �r r_z5UbuntuSourcesList._gpg_key_exists.<locals>.<listcomp>�s>���p�p�p�A�^_�^j�^j�kn�^o�^o�p�R�W�\�\�)�Q�7�7�p�p�pr"z--list-packetszCould check key against file r�T)
�APT_KEY_DIRS�extendr2�listdirr3r�rrr�r�r��debugr)
r9r�r��keyfiles�key_filerr�r�r�r�s
         @r r�z!UbuntuSourcesList._gpg_key_exists�s�����*�+��%�	r�	r�I��O�O�p�p�p�p���I�AV�AV�p�p�p�q�q�q�q� �	�	�H��w�~�~�h�'�'�	
��#'�;�#:�#:�D�L�JZ�\d�;e�#f�#f�L�B��S�S����)�����J�J�J����R[�\]�R^�R^�R^�_�`�`�`��H�H�H�H���������#�c�)�)� �E��E���s�(&B�C� (C
�
CrZc	�x�|�d���rX|�|��\}}}||jvrdS|�||��}|�|d���s�d}|jj�s�|jr|jddddd|dg}	n�tD]#}
tj
�|
��rn6�$|j�d	d
�
t��z��|
�dtj
�|���dd
���d
|�d
|�d�}|jdddd|dg}	|j�|	dd���\}}}
|r�t%|��dkr|j�d||
|	���	t'|d��5}|�|��ddd��n#1swxYwY|j�d|d�d|�d���nI#t,t.f$r5}|j�d||
t1|�����Yd}~nd}~wwxYw|p|�|�d|j����}n4|�|d���d}|p|�|��}|�|||��dS)N�ppa:�signing_key_fingerprintrZ�advz--recv-keysz--no-ttyz--keyserverzhkp://keyserver.ubuntu.com:80zNUnable to find any existing apt gpgp repo directories, tried the following: %sz, rFrN�-z.gpgz--exportT)r��encodingrz"Unable to get required signing key)rr�stderr�command�wbzAdded repo key "z" for apt to file "�"z)Unable to add required signing key for%s )rrr�errorrMr�r�)rdr��
repos_urlsr�r�rrr�r�r2r3r�rrH�basename�replacer�rr�r{r�r�r�r�rrbr�rir�)r9r`rCr:rBr�r�r��keyfiler�keydirr�stdoutrrr�s                r r�zUbuntuSourcesList.add_source�s����?�?�6�"�"�-	:�*.�*:�*:�4�*@�*@�'�F�I�x����(�(����%�%�i��:�:�D��+�+�D�1J�,K�L�L�
M����{�-�M��'�Z�#'�#3�U�M�:�Wd�gF�#'�(A�#B�#D���'3�^�^�F�!�w�~�~�f�5�5�&� %��&�!�K�1�1�3C�FJ�FO�FO�P\�F]�F]�3]�^�^�^�7=�v�v�r�w�?O�?O�PV�?W�?W�?_�?_�`c�eh�?i�?i�?i�?i�kt�kt�kt�v~�v~�v~�"��#'�<��]�Lk�mw�y}�X�zY�#Z��)-��)@�)@��SW�bf�)@�)g�)g�&�B����	M��v�;�;�!�+�+� �K�1�1�6Z�_a�jp�{B�1�C�C�C�M�!%�g�t�!4�!4�0�� !�������0�0�0�0�0�0�0�0�0�0�0����0�0�0�0� �K�O�O�O�Z^�_x�Zy�Zy�Zy�|C�|C�|C�-D�E�E�E�E�� '��1�M�M�M� �K�1�1�6a�fh�qw�@I�JK�@L�@L�1�M�M�M�M�M�M�M�M�����M�����R�4�1�1�T�T�T�4�=�=�2Q�R�R�D�D��[�[��D�[�I�I�!�L�F��9�4�1�1�&�9�9�D����v�w��5�5�5�5�5s<�H�/G�H�G�H�G�*H�I
�+I�I
c���|�d��r|�|��d}n|�|d���d}|�|��dS)Nr�rTr�r�)rdr�rir�r�s   r r�zUbuntuSourcesList.remove_source+se���?�?�6�"�"�	M��%�%�d�+�+�A�.�F�F��[�[��D�[�I�I�!�L�F��!�!�&�)�)�)�)�)r"c�8�g}|j���D]}}|D]x}|d}|d}|d}|r|s�|�d��r/|�|��\}}}	|�|���c|�|���y�~|S)NrWr��r�)r-�valuesrdr�r})
r9�
_repositories�parsed_repos�parsed_repor@rA�source_linerBr�r�s
          r rzUbuntuSourcesList.repos_urls2s����
� �J�-�-�/�/�
	6�
	6�L�+�
6�
6��#�A���%�a�.��)�!�n����G����)�)�&�1�1�6�26�2B�2B�;�2O�2O�/�F�I�x�!�(�(��0�0�0�0�!�(�(��5�5�5�5�
6��r"r�r�)r%r&r'r�r;r�r�r�r�r�r�r��propertyr�
__classcell__)r�s@r r�r��s��������
<�F�n�n�n�n�n�.�.�.�.�6�6�6�	)�	)�	)�������006�06�06�06�d*�*�*�����X�����r"r�c�&�t|������|�����D]5}tj�|��rtj|���6|���dS)z4Revert the sourcelist files to their previous state.N)r.�keys�
differencer2r3r�r�r�)�sources_before�
sources_after�sourceslist_beforerIs    r �revert_sources_listrGs����
�*�*�,�,�-�-�8�8��9L�9L�9N�9N�O�O� � ��
�7�>�>�(�#�#�	 ��I�h������������r"c��
�tttdd���tddddg���td���td	dd
g���tdd
���tdd���td���td	d���td	d���td�����
�
d���}|j}|jd}|jd}|jd}d}t�strdnd}t��r4|�d�|tj	�����gd�}t|d��}|rt|��|jr|�d|z���|drt||��n|�d|z���t|d��}|rt|��n4|�d�|tj	�����|s|�d���ttt j��rt%|��}n|�d���t'j|��}	|���}
	|dkr|�|��n|dkr|�|��n=#t0$r0}|�d t3|��z���Yd}~nd}~wwxYw|���}|
|k}
|
r�|jr�g}t7|
������|�����D]X}|�|
�|d!��|�|d!��|d"f||
v|d"f||vd#����Yni}|
�r�|j�sz	|� ��|�rd!}|j�d$��}|j�d%��}tCj"d&d'��d(z}tG|��D]�}	tIj%��}|�&��n�#tHj'j($r}t3|��}Yd}~nd}~wwxYwd)|z|z}||kr||z}tSj*|����tW|
||	��|�d*|r|nd+z���nR#tXtZf$r>}tW|
||	��|�t3|�����Yd}~nd}~wwxYw|�.|
|||�,��dS)-N�strT)�typer��present�absent)r�default�choices�raw)r�boolzupdate-cache)rr!�aliases�int�)rr!�)
�repo�stater��update_cache�update_cache_retries�update_cache_retry_max_delayrIr!�validate_certsr�)�
argument_spec�supports_check_moder)r*r+zpython3-aptz
python-aptz+{0} must be installed and visible from {1}.r)z/usr/bin/python3z/usr/bin/python2z/usr/bin/python�aptzX%s must be installed to use check mode. If run normally this module can auto-install it.r!z4%s is not installed, and install_python_apt is Falsez/Please set argument 'repo' to a non-empty valuez1Module apt_repository is not supported on target.zInvalid repository string: %srZz	/dev/null)�before�after�
before_header�after_headerr,r-ri�g@�@r�zFailed to update apt cache: %szunknown reason)�changedr)r*�diff)/rr�rO�HAVE_PYTHON_APTrrr�format�sys�
executabler	r
rr!�
isinstancer��aptsources_distro�Distributionr��copy�deepcopyr�r�r�r$r�_diffr.r�unionr}r�r��random�randint�ranger1�Cacher�cache�FetchFailedException�time�sleeprr�r��	exit_json)rrOr)r*r+�sourceslistr�interpreters�interpreterrrr�rr6r7rIr�r,r-�	randomize�retryrGr��delays                        r �mainrRRsb��
���5�4�0�0�0��E�9�x��>S�T�T�T��5�!�!�!��6�4�.�AQ�R�R�R�!%�5�!�!<�!<�!<�)-�5�"�)E�)E�)E��u�%�%�%�#���>�>�>��V�T�:�:�:��u�%�%�%�
�
�
�!����F�"�]�F��=�� �D��M�'�"�E��=��0�L��K��/u�),�=�}�}����?�?�	u����!N�!U�!U�Vb�dg�dr�!s�!s��t�t�t�R�R�R��3�L�%�H�H���	(��;�'�'�'���	d����"T�Vb�"c��
d�
d�
d��&�'�	h��v�|�4�4�4�4����!W�Zf�!f��g�g�g�4�L�%�H�H���	u�
�;�'�'�'�'�
���!N�!U�!U�Vb�dg�dr�!s�!s��t�t�t��R����P��Q�Q�Q��&�+�8�9�9�R�'��/�/������P��Q�Q�Q���{�3�3�� �%�%�'�'�N�N��I����"�"�4�(�(�(�(�
�h�
�
��%�%�d�+�+�+����N�N�N����<�y��}�}�L��M�M�M�M�M�M�M�M�����N���� �$�$�&�&�M��
�-�G���6�<�����N�/�/�1�1�2�2�8�8��9K�9K�9M�9M�N�N�	b�	b�H��K�K�>�#5�#5�h��#C�#C�"/�"3�"3�H�b�"A�"A�+3�[�*A�(�R`�B`�*a�*2�K�)@��Q^�A^�)_�a�a�
b�
b�
b�
b�	b����0�v�(�0�	0��������
p���'-�}�'8�'8�9O�'P�'P�$�/5�}�/@�/@�A_�/`�/`�,�"�N�1�d�3�3�f�<�	�"�#7�8�8�p�p�E�+� #�	��������������9�9�+�+�+�'��l�l�����������+������J��2�E��;�;�;� <�y� H���J�u�%�%�%�%�'��
�GY�Z�Z�Z��$�$�)I�TW�Mm�S�S�]m�)n�$�o�o�o�����!�	0�	0�	0���
�?Q�R�R�R�����2����/�/�/�/�/�/�/�/�����	0�������W�4�u�4��H�H�H�H�Hs\�7K�
L�&L�L�!A6T�'R�?T�R.�R)�$T�)R.�.AT�U�4U�U�__main__)2�
__future__rrrr�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURNr?r6r�r2rPr:r�rCrI�ansible.module_utils.basicr�#ansible.module_utils.common.respawnrr	r
�ansible.module_utils._textr�ansible.module_utils.sixr�ansible.module_utils.urlsr
r1rl�aptsources.distror�r=�
get_distror8�ImportErrorr�r�r\r!�	Exceptionr$�objectr*r�rrRr%r(r"r �<module>rcsy��A�@�@�@�@�@�@�@�@�@��
�Z�
�x*��X
��������������	�	�	�	�	�	�	�	�
�
�
�
�����
�
�
�
�����4�4�4�4�4�4�l�l�l�l�l�l�l�l�l�l�0�0�0�0�0�0�(�(�(�(�(�(�/�/�/�/�/�/���J�J�J��N�N�N�1�1�1�1�1�1�
)�
�
)�
+�
+�F��O�O������15�5�C�5�'�5�%���O�O�O�����
V�U�U����'��V�V�V�	�	�	�	�	�I�	�	�	�a*�a*�a*�a*�a*�&�a*�a*�a*�HR�R�R�R�R��R�R�R�j���II�II�II�X�z����D�F�F�F�F�F��s�A:�:B�B

Youez - 2016 - github.com/yon3zu
LinuXploit