ansible.builtin.subversion module – Deploys a subversion repository
Note
This module is part of ansible-core
and included in all Ansible
installations. In most cases, you can use the short
module name
subversion
even without specifying the collections keyword.
However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.subversion
for easy linking to the
module documentation and to avoid conflicting with other collections that may have
the same module name.
Synopsis
Deploy given repository URL / revision to dest. If dest exists, update to the specified revision, otherwise perform a checkout.
Requirements
The below requirements are needed on the host that executes this module.
subversion (the command line tool with
svn
entrypoint)
Parameters
Parameter |
Comments |
---|---|
If Choices:
|
|
Absolute path where the repository should be deployed. The destination directory must be specified unless |
|
Path to svn executable to use. If not supplied, the normal mechanism for resolving binary paths will be used. |
|
If Choices:
|
|
If Choices:
|
|
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. Choices:
|
|
|
|
The subversion URL to the repository. |
|
Specific revision to checkout. Default: |
|
If Choices:
|
|
If Choices:
|
|
|
|
If If Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: none |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platform: posix |
Target OS/families that can be operated against |
Notes
Note
This module does not handle externals.
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