0 ; ˆl–Ðz¾”Ji?u4 ^¸ËwÒ˜´oÆ „ -²×Åa–ß=¿JJj"Tâ�ÆY¸ÓªbÑ¿Ä4Þ # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- 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) 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) ''' EXAMPLES = ''' - 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 ''' RETURN = r'''#''' import os import re from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.locale im