Ansible command from inside virtualenv?

后端 未结 5 851
不知归路
不知归路 2021-01-30 08:49

This seems like it should be really simple:

tasks:
- name: install python packages
  pip: name=${item} virtualenv=~/buildbot-env
  with_items: [ buildbot ]
- nam         


        
5条回答
  •  广开言路
    2021-01-30 09:35

    Just run the virtualenvs pip in a shell:

    shell: ~/buildbot-env/pip install ${item}
    

    Works like a charm. I have no idea what the pip module does with virtualenvs, but it seems pretty useless.

提交回复
热议问题