2017-01-13 9 views
1

この例では、Django-citiesは失敗します。特定のgitコミットのPipインストールが不能なプレーブで失敗する

- hosts: localhost 
    tasks: 
    - name: Install Django 
    pip: name=Django 
    - name: Install Userena 
    pip: name=django-userena 
    - name: Install Django Messages 
    pip: name=https://github.com/arneb/django-messages/archive/master.zip 
    - name: Install Django Cities 
    pip: name=git+https://github.com/coderholic/[email protected] 

エラー:

TASK [Install Django Cities] *************************************************** 
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/pip2 install -e git+https://github.com/coderholic/[email protected]", 
"failed": true, "msg": "\n:stderr: --editable=git+https://github.com/coderholic/[email protected] is not the right format; it must have #egg=Package\nYou are using pip version 8.1.2, however version 9.0.1 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\n"} 
    to retry, use: --limit @/root/cannablr/ansible/playbooks/installdjango.retry 

はAnsibleで許可されていないピップを経由してコミットgitのをインストールしますか?

答えて

1

あなたはコマンドラインでこれを実行する場合は、同じエラーを取得します:

$ pip install -e git+https://github.com/coderholic/[email protected] 
--editable=git+https://github.com/coderholic/[email protected] is not the right format; it must have #egg=Package 

あなたはそれに#egg=packagenameを追加することができますし、それがうまくいく:

$ pip install -e git+https://github.com/coderholic/[email protected]#egg=django-cities 
Obtaining django-cities from git+https://github.com/coderholic/[email protected]#egg=django-cities 
    Cloning https://github.com/coderholic/django-cities.git (to d0163f393e7557914b3f2c6882e740537ca63fd6) to src/django-cities 

だから#egg=django-citiesを追加URLにAnsibleで接続すれば、あなたはうまくいくでしょう。

注:git+https://....#egg=xyz yamlを引用することをおすすめします。そこには多くの魔法のキャラクターがあります。

関連する問題