On this page
ansible.builtin.subversion – Deploys a subversion repository
Note
This module is part of ansible-base
and included in all Ansible installations. In most cases, you can use the short module name subversion even without specifying the collections:
keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.
New in version 0.7: of ansible.builtin
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 | Choices/Defaults | Comments |
---|---|---|
checkout
boolean
added in 2.3 of ansible.builtin
|
|
If no , do not check out the repository if it does not exist locally.
|
dest
string / required
|
Absolute path where the repository should be deployed.
|
|
executable
string
added in 1.4 of ansible.builtin
|
Path to svn executable to use. If not supplied, the normal mechanism for resolving binary paths will be used.
|
|
export
boolean
added in 1.6 of ansible.builtin
|
|
If yes , do export instead of checkout/update.
|
force
boolean
|
|
If yes , modified files will be discarded. If no , module will fail if it encounters modified files. Prior to 1.9 the default was yes .
|
in_place
boolean
added in 2.6 of ansible.builtin
|
|
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.
|
password
string
|
--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.
--password-from-stdin parameter when svn is greater or equal to version 1.10.0.
|
|
repo
string / required
|
The subversion URL to the repository.
aliases: name, repository |
|
revision
string
|
Default:
"HEAD"
|
Specific revision to checkout.
aliases: version |
switch
boolean
added in 2.0 of ansible.builtin
|
|
If no , do not call svn switch before update.
|
update
boolean
added in 2.3 of ansible.builtin
|
|
If no , do not retrieve new revisions from the origin repository.
|
username
string
|
--username parameter passed to svn.
|
Notes
Note
- This module does not handle externals.
- Supports
check_mode
.
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
Authors
- Dane Summers (@dsummersl) <njharman@gmail.com>
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/subversion_module.html