user2656732
user2656732

Reputation:

Cannot checkout svn repo with Ansible in Virtualbox

I want to checkout an svn-repository into my Virtualbox using Ansible. Somehow the task "checkout config" never ends.

- name: checkout config
  subversion:
    repo: svn+ssh://svn.someserver.loc/srv/svn/repository/software/
    dest: /home/user/.somedir

I already thought into the direction of missing known_hosts - keys but I am not sure whether I implemented the key for the svn-server correctly.

When repetitively pressing "df" in the VM I cannot see any change in disk usage while the task is running.

So I assume there must be an error while svn checkout.

Thanks for your help

My Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "Centos_V1.0.box"
  config.vm.hostname = "box.vm"
  config.ssh.username = "user"
  config.ssh.password = "user01"
  config.ssh.port = "2222"
  config.vm.provision "ansible" do |ansible|
    ansible.limit = 'all'
    #ansible.verbose = "-v"
    ansible.playbook = "playbook.yml"
    ansible.inventory_path = "hosts"
  end
  config.vm.provider :virtualbox do |vb|
    vb.name = "BOX"
  end

My playbook.yml:

---
- hosts: VirtualBoxes
  strategy: debug

  vars_prompt:
    - name: "version"
      prompt: "Which version would you like to install: 1,2,3,4"

  tasks:
  - name: install prog1
    become: true
    yum: name=prog1 state=latest
  - name: install prog2
    become: true
    yum: name=prog2 state=latest

  - name: install prog3
    become: true
    yum: name=prog3 state=latest

  - name: install prog4
    become: true
    yum: name=prog4 state=latest

  - name: install tmux
    become: true
    yum: name=tmux state=latest

  - name: delete somedir
    file:
      path: /home/user/.confdir/
      state: absent

  #- name: tell the host about our servers it might want to ssh to
  #  known_hosts:
  #  path: /home/user/.ssh/known_hosts
  #  name: svn.someserver.loc
  #  key: "SWEAGFSDFSJJERKESJHFNKMDFMMRLMLFDLGRSWEAGFSDFSJJERKESJHFNKMDFMMRLMLFDLGRSWEAGFSDFSJJERKESJHFNKMDFMMRLMLFDLGR="

- name: checkout config
  subversion:
    repo: svn+ssh://svn.someserver.loc/srv/svn/repository/software/
    dest: /home/user/

My Inventory file for ansible:

[VirtualBoxes]
localhost:2222 ansible_connection=ssh ansible_ssh_user=user ansible_ssh_pass=user01

Upvotes: 0

Views: 412

Answers (1)

user2656732
user2656732

Reputation:

The reason for me not being able to svn checkout was that on top to a svn password the ssh keys for the svn+ssh procedure where needed. We now copied the relevant keys into the machine.

Upvotes: 2

Related Questions