首页   注册   登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xiaohanyu
V2EX  ›  Vagrant

vagrant-hackerbox: 更友好的vagrant box

  •  
  •   xiaohanyu · 2013-07-21 12:44:20 +08:00 · 5020 次点击
    这是一个创建于 2377 天前的主题,其中的信息可能已经有所发展或是发生改变。
    https://github.com/xiaohanyu/vagrant-hackerbox

    提供一种简明的方法将裸的vagrant box变成更适合工作的box,主要是集成一些实用的小工具。目前还只有ubuntu的box,后续会加入其余linux发行版的支持。
    8 回复  |  直到 1970-01-01 08:00:00 +08:00
    zeroday
        1
    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
        2
    xiaohanyu   2014-02-28 16:44:26 +08:00
    @zeroday try `sudo pip install ansible`
    zeroday
        3
    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
        4
    xiaohanyu   2014-03-01 19:13:46 +08:00
    @zeroday `sudo pip install MarkupSafe`
    zeroday
        5
    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
        6
    zeroday   2014-03-03 22:01:18 +08:00
    找到解决方法了,修改hosts文件为你自定义的访问ip。
    zeroday
        7
    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
        8
    zeroday   2014-03-04 03:03:56 +08:00
    挂个VPN又解决了。
    关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   1245 人在线   最高记录 5168   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.3 · 24ms · UTC 17:07 · PVG 01:07 · LAX 09:07 · JFK 12:07
    ♥ Do have faith in what you're doing.