xiaohanyu
V2EX  ›  Vagrant

vagrant-hackerbox: 更友好的vagrant box

  •  
  •   xiaohanyu · Jul 21, 2013 · 6571 views
    This topic created in 4723 days ago, the information mentioned may be changed or developed.
    https://github.com/xiaohanyu/vagrant-hackerbox

    提供一种简明的方法将裸的vagrant box变成更适合工作的box,主要是集成一些实用的小工具。目前还只有ubuntu的box,后续会加入其余linux发行版的支持。
    8 replies    1970-01-01 08:00:00 +08:00
    zeroday
        1
    zeroday  
       Feb 25, 2014
    使用时出现了点问题

    $ 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  
    OP
       Feb 28, 2014
    @zeroday try `sudo pip install ansible`
    zeroday
        3
    zeroday  
       Mar 1, 2014
    @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  
    OP
       Mar 1, 2014
    @zeroday `sudo pip install MarkupSafe`
    zeroday
        5
    zeroday  
       Mar 2, 2014
    @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  
       Mar 3, 2014
    找到解决方法了,修改hosts文件为你自定义的访问ip。
    zeroday
        7
    zeroday  
       Mar 3, 2014
    这个安装失败了,是配置错误吗?

    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  
       Mar 4, 2014
    挂个VPN又解决了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   914 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 19:49 · PVG 03:49 · LAX 12:49 · JFK 15:49
    ♥ Do have faith in what you're doing.