Mr.DevEng
Mr.DevEng

Reputation: 2421

"Failed to find required executable svn in paths" error in Ansible SVN checkout

I am trying to checkout one SVN repository by using Ansible SVN module by running a Ansible playbook. When I am checking out the SVN repository, I am getting the following error:

TASK [pipelinerole : Checkout/Update SVN repository] ***************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to find required executable svn in paths: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/sbin:/usr/sbin:/usr/local/sbin"}
[WARNING]: Could not create retry file '/home/pipelinesite.retry'.
[Errno 13] Permission denied: u'/home/pipelinesite.retry'

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1 

I am using an Ansible role for running SVN Checkout. I am added the YAML for SVN checkout like the following:

 - name: Checkout/Update SVN repository
   subversion:
    repo: http://<My-IP>/svn/pipeline
    checkout: yes
    update: yes
    In_place: yes
    force: yes
    dest: ../../SpaceStudyTest
    username: <My-Username>
    password: <My-Password>

My SVN passwords and proper and permissions are done for checking out the directory. What is the mistake I am making here?

Upvotes: 0

Views: 2603

Answers (1)

clockworknet
clockworknet

Reputation: 3056

You need to have 'svn' installed on your system for this Ansible module to work. It is mentioned in the docs. The error is saying that Ansible cannot locate the svn command, in the paths in its environment.

Install the 'svn' package if you have not already. If it is installed, run either

which svn

or

find / -name 'svn' -type f

to locate the binary and then either add executable: <path returned by the previous commands> to your subversion task definition or add the directory containing 'svn' to the $PATH environment variable.

Upvotes: 2

Related Questions