【问题标题】:Ansible Pip Install python modules into vendor subdirectory using '--target'Ansible Pip 使用“--target”将 python 模块安装到供应商子目录中
【发布时间】:2018-08-24 06:46:18
【问题描述】:

'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

【问题讨论】:

    标签: python pip ansible pypi


    【解决方案1】:

    您可以使用 pip 模块的extra_args 选项。请参考以下示例

    - name: install to vendor directory
      pip:
        requirements: requirements.txt
        chdir: /install/directory
        extra_args: --target vendor
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-24
      相关资源
      最近更新 更多