Symlinking FreeBSD svnlite to svn


I was deploying a WordPress install for a friend over the weekend, and was about to run this part of a well-used Ansible playbook:

- name: Install Subversion
    name: subversion
    state: present    
- name: Pull WordPress
    dest: "/var/www/{{ slug }}/wordpress"
    repo: "{{ wp_version }}"

But then I remembered my New Year’s resolution to use more from FreeBSD base, rather than automatically reaching for ports. There’s a more than capable svnlite client, which makes sense given you might need one to pull the ports tree before you can download subversion.

Peter’s comment in revision 251886 back in 2013 advises it should work with this relatively small repository:

To be absolutely clear, this is not intended for any use other than checking out freebsd source and committing, like we once did with cvs. It should be usable for small scale local repositories that don’t need the python/perl plugin architecture.

But would it work with Ansible? I symlinked the FreeBSD svnlite(1) client to svn in /opt, which is where I stash my own binaries and scripts:

- name: Symlink svnlite to svn
    src: /usr/bin/svnlite
    dest: /opt/bin/svn
    state: link
- name: Pull WordPress

I ran the playbook again, and it worked!

The next step would be to see if Ansible can be supplied a subversion path, rather than using a symlink.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.