简体   繁体   中英

Ansible Pip Install python modules into vendor subdirectory using '--target'

What is the Ansible pip module equalant of 'pip install --target vendor' ? Is 'virtualenv=' is the right choice to achieve this? Thanks!

- name: Download calibre-web dependencies into vendor subdirectory.
  command: pip install --target vendor -r ./requirements.txt
  args:
      chdir: /install/directory

You could make use of the extra_args option of the pip module. Please refer to example below

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM