vagrant-hackerbox: 更友好的vagrant box

2013-07-21 12:44:20 +08:00
 xiaohanyu
https://github.com/xiaohanyu/vagrant-hackerbox

提供一种简明的方法将裸的vagrant box变成更适合工作的box,主要是集成一些实用的小工具。目前还只有ubuntu的box,后续会加入其余linux发行版的支持。
5889 次点击
所在节点    Vagrant
8 条回复
zeroday
2014-02-25 12:04:40 +08:00
使用时出现了点问题

$ vagrant provision

[default] Running provisioner: ansible...
The executable 'ansible-playbook' Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.
xiaohanyu
2014-02-28 16:44:26 +08:00
@zeroday try `sudo pip install ansible`
zeroday
2014-03-01 15:46:02 +08:00
@xiaohanyu 又出现问题。

$ vagrant provision
[default] Running provisioner: ansible...
Traceback (most recent call last):
File "/usr/local/bin/ansible-playbook", line 25, in <module>
import ansible.playbook
File "/Library/Python/2.7/site-packages/ansible/playbook/__init__.py", line 18, in <module>
import ansible.inventory
File "/Library/Python/2.7/site-packages/ansible/inventory/__init__.py", line 27, in <module>
from ansible.inventory.script import InventoryScript
File "/Library/Python/2.7/site-packages/ansible/inventory/script.py", line 25, in <module>
from ansible import utils
File "/Library/Python/2.7/site-packages/ansible/utils/__init__.py", line 29, in <module>
from ansible.utils import template
File "/Library/Python/2.7/site-packages/ansible/utils/template.py", line 21, in <module>
import jinja2
File "/Library/Python/2.7/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/Library/Python/2.7/site-packages/jinja2/environment.py", line 13, in <module>
from jinja2 import nodes
File "/Library/Python/2.7/site-packages/jinja2/nodes.py", line 18, in <module>
from jinja2.utils import Markup
File "/Library/Python/2.7/site-packages/jinja2/utils.py", line 520, in <module>
from markupsafe import Markup, escape, soft_unicode
ImportError: No module named markupsafe
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
xiaohanyu
2014-03-01 19:13:46 +08:00
@zeroday `sudo pip install MarkupSafe`
zeroday
2014-03-02 00:00:14 +08:00
@xiaohanyu 又出现新问题了。

$ vagrant provision
[default] Running provisioner: ansible...

PLAY [vagrant] ****************************************************************

GATHERING FACTS ***************************************************************
fatal: [192.168.33.10] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue

TASK: [modify apt source list] ************************************************
FATAL: no hosts matched or all hosts have already failed -- aborting


PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/alex/hackbook.retry

192.168.33.10 : ok=0 changed=0 unreachable=1 failed=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
zeroday
2014-03-03 22:01:18 +08:00
找到解决方法了,修改hosts文件为你自定义的访问ip。
zeroday
2014-03-03 23:29:48 +08:00
这个安装失败了,是配置错误吗?

failed: [66.66.66.10] => (item=virtualenvwrapper) => {"cmd": "/usr/bin/pip install --use-mirrors virtualenvwrapper", "failed": true, "item": "virtualenvwrapper"}
msg: stdout: Downloading/unpacking virtualenvwrapper
Running setup.py egg_info for package virtualenvwrapper

Installed /tmp/build/virtualenvwrapper/pbr-0.6-py2.7.egg
[pbr] Processing SOURCES.txt
warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs'
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Downloading/unpacking virtualenv-clone (from virtualenvwrapper)
Downloading virtualenv-clone-0.2.4.tar.gz
Running setup.py egg_info for package virtualenv-clone

Downloading/unpacking stevedore (from virtualenvwrapper)
Could not find any downloads that satisfy the requirement stevedore (from virtualenvwrapper)
No distributions at all found for stevedore (from virtualenvwrapper)
Storing complete log in /root/.pip/pip.log


FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/alex/hackbook.retry

66.66.66.10 : ok=13 changed=10 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
zeroday
2014-03-04 03:03:56 +08:00
挂个VPN又解决了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/76463

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX