0
我想用Ansible簽出一個SVN版本庫到我的VirtualBox的。 不知怎的任務「結賬配置」永遠不會結束。不能與Ansible結帳的svn回購在VirtualBox中
- name: checkout config
subversion:
repo: svn+ssh://svn.someserver.loc/srv/svn/repository/software/
dest: /home/user/.somedir
我已經想到到失蹤的known_hosts的方向 - 鍵,但我不知道我是否正確實現了svn服務器的關鍵。
當重複按下「DF」在虛擬機中我看不到磁盤使用情況的任何變化的任務運行時。
所以我認爲必須有,而svn籤的錯誤。
感謝您的幫助
我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
我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/
我對ansible清單文件:
[VirtualBoxes]
localhost:2222 ansible_connection=ssh ansible_ssh_user=user ansible_ssh_pass=user01
您可以使用註冊和調試,以保存和打印顛覆任務輸出。 –
我使用了調試,但由於任務仍在運行,所以我沒有收到任何信息。模塊顛覆不存在寄存器。 – Marc
我知道註冊不在subversion模塊中:http://docs.ansible.com/ansible/playbooks_variables.html#registered-variables –