basically here is my role
---
- name: pip install mimodd {{ version }}
pip:
name: mimodd
version: "{{ version }}"
virtualenv: "{{ apps_dir }}/mimodd-{{ version }}"
virtualenv_python: python3.5
virtualenv_site_packages: yes
tags: mimodd
- file:
dest: "{{ modules_bio }}/mimodd-{{ version }}"
state: directory
mode: 0755
tags: mimodd
- name: mimodd {{ version }} module definition
template:
src: sw-module.lua.j2
dest: "{{ modules_bio }}/mimodd/{{ version }}.lua"
owner: "{{ main_guy }}"
mode: 0644
with_items:
- dir: 'mimodd-{{ version }}'
help_text: 'loads mimodd pipeline'
append: true
tags: mimodd
以下是我的错误信息,很明显它正在使用pip2!我如何让它使用pip3?
fatal: [biotraining-bak]: FAILED! => {
"changed": false,
"cmd": "/usr/local/bin/pip2 install mimodd==0.1.7.3",
"failed": true,
"invocation": {
"module_args": {
"chdir": null,
"editable": true,
"executable": null,
"extra_args": null,
"name": [
"mimodd"
],
"requirements": null,
"state": "present",
"umask": null,
"use_mirrors": true,
"version": "0.1.7.3",
"virtualenv": "/software/apps/mimodd-0.1.7.3",
"virtualenv_command": "virtualenv",
"virtualenv_python": "python3.5",
"virtualenv_site_packages": true
},
"module_name": "pip"
},
我尝试了可执行文件:pip3
,但出现了这个错误
"msg": "parameters are mutually exclusive: ['executable', 'virtualenv']"
额外信息
Ansible 版本
[biostation]~$ ansible --version
ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides
针对Ubuntu 16.04和Linux系统的通用技术。
Python 2.7.12 ubuntu@biotraining-bak:~$ which python /usr/bin/python``` 它应该是自带的。
- serinepython-pip python3-pip python-dev
。 - serine