ansible.builtin.subversion (v2.16.5) — module

Deploys a subversion repository

| "added in version" 0.7 of ansible.builtin"

Authors: Dane Summers (@dsummersl) <njharman@gmail.com>

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Deploy given repository URL / revision to dest. If dest exists, update to the specified revision, otherwise perform a checkout.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Checkout subversion repository to specified folder
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Export subversion directory to folder
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/export
    export: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
dest:
    description:
    - Absolute path where the repository should be deployed.
    - The destination directory must be specified unless O(checkout=no), O(update=no),
      and O(export=no).
    type: path

repo:
    aliases:
    - name
    - repository
    description:
    - The subversion URL to the repository.
    required: true
    type: str

force:
    default: 'no'
    description:
    - If V(true), modified files will be discarded. If V(false), module will fail if it
      encounters modified files. Prior to 1.9 the default was V(true).
    type: bool

export:
    default: 'no'
    description:
    - If V(true), do export instead of checkout/update.
    type: bool
    version_added: '1.6'
    version_added_collection: ansible.builtin

switch:
    default: 'yes'
    description:
    - If V(false), do not call svn switch before update.
    type: bool
    version_added: '2.0'
    version_added_collection: ansible.builtin

update:
    default: 'yes'
    description:
    - If V(false), do not retrieve new revisions from the origin repository.
    type: bool
    version_added: '2.3'
    version_added_collection: ansible.builtin

checkout:
    default: 'yes'
    description:
    - If V(false), do not check out the repository if it does not exist locally.
    type: bool
    version_added: '2.3'
    version_added_collection: ansible.builtin

in_place:
    default: 'no'
    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
    version_added: '2.6'
    version_added_collection: ansible.builtin

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

revision:
    aliases:
    - rev
    - version
    default: HEAD
    description:
    - Specific revision to checkout.
    type: str

username:
    description:
    - C(--username) parameter passed to svn.
    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'
    version_added_collection: ansible.builtin

validate_certs:
    default: 'no'
    description:
    - If V(false), passes the C(--trust-server-cert) flag to svn.
    - If V(true), does not pass the flag.
    type: bool
    version_added: '2.11'
    version_added_collection: ansible.builtin