subversion - Deploys a subversion repository

Synopsis

Parameters

Parameter Choices/Defaults Comments
checkout
bool

(added in 2.3)
    Choices:
  • no
  • yes ←
If no, do not check out the repository if it does not exist locally.
dest
required
Absolute path where the repository should be deployed.
executable
(added in 1.4)
Path to svn executable to use. If not supplied, the normal mechanism for resolving binary paths will be used.
export
bool

(added in 1.6)
    Choices:
  • no ←
  • yes
If yes, do export instead of checkout/update.
force
bool
    Choices:
  • no ←
  • yes
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
bool

(added in 2.6)
    Choices:
  • no ←
  • yes
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
--password parameter passed to svn.
repo
required
The subversion URL to the repository.

aliases: name, repository
revision Default:
HEAD
Specific revision to checkout.

aliases: version
switch
bool

(added in 2.0)
    Choices:
  • no
  • yes ←
If no, do not call svn switch before update.
update
bool

(added in 2.3)
    Choices:
  • no
  • yes ←
If no, do not retrieve new revisions from the origin repository.
username
--username parameter passed to svn.

Notes

Note

  • Requires svn to be installed on the client.
  • This module does not handle externals.

Examples

- name: Checkout subversion repository to specified folder
  subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout

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

- name: Get information about the repository whether or not it has already been cloned locally
- subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /srv/checkout
    checkout: no
    update: no

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as core which means that it is maintained by the Ansible Core Team. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Core Team, see here.

Support

For more information about Red Hat’s support of this module, please refer to this Knowledge Base article

Author

Hint

If you notice any issues in this documentation you can edit this document to improve it.