我正在尝试使用 apip.installed
或virtualenv.managed
state 使用位于 minion 上的需求文件(由早期git.latest
状态安装)来设置 virtualenv。这是使用的版本pip.installed
:
mysite-env:
virtualenv.managed:
- name: /opt/django/mysite
- cwd: /opt/django/mysite
- user: mysite
- runas: mysite
- system_site_packages: True
mysite-reqs:
pip.installed:
- no_index: True
- find_links: http://pypi.mysite.com/
- requirements: /opt/django/mysite/requirements/production.txt
- pip_exists_action: switch
- cwd: /opt/django/mysite
- pip_bin: /opt/django/mysite/bin/pip
- bin_env: /opt/django/mysite
- user: mysite
- watch:
- git: mysite-project
当我尝试运行此状态时,我收到此错误:
ID: mysite-reqs
Function: pip.installed
Result: False
Comment: Unable to process requirements file /opt/django/mysite/requirements/production.txt. Error: Ignoring indexes: https://pypi.python.org/simple/
Could not open requirements file: [Errno 2] No such file or directory: '/tmp/requirements.txt'
Storing debug log for failure in /home/mysite/.pip/pip.log
但这不是我传递给需求的路径。这看起来有点像一个错误,可能/tmp/requirements.txt
是硬编码的,因为它希望我使用salt://
URL 而不是本地文件路径。
难道我做错了什么?这是一个错误,有没有解决它的好方法?