Ansible Pip 使用“--target”将 python 模块安装到 vendor 子目录中
Ansible Pip Install python modules into vendor subdirectory using '--target'
'pip install --target vendor' 的 Ansible pip 模块等价物是什么? 'virtualenv=' 是实现此目标的正确选择吗?谢谢!
- name: Download calibre-web dependencies into vendor subdirectory.
command: pip install --target vendor -r ./requirements.txt
args:
chdir: /install/directory
您可以使用 pip 模块的 extra_args
选项。请参考以下范例
- name: install to vendor directory
pip:
requirements: requirements.txt
chdir: /install/directory
extra_args: --target vendor
'pip install --target vendor' 的 Ansible pip 模块等价物是什么? 'virtualenv=' 是实现此目标的正确选择吗?谢谢!
- name: Download calibre-web dependencies into vendor subdirectory.
command: pip install --target vendor -r ./requirements.txt
args:
chdir: /install/directory
您可以使用 pip 模块的 extra_args
选项。请参考以下范例
- name: install to vendor directory
pip:
requirements: requirements.txt
chdir: /install/directory
extra_args: --target vendor