3e6880aa17
TASK [Install pip using get-pip.py] ******************************************** task path: /root/rhos-ci/jenkins/workspace/DFG-network-neutron-14_director-rhel-virthost-3cont_2comp-ipv4-vxlan-tobiko/infrared/plugins/tobiko/infrared/tasks/install.yml:1 Saturday 28 September 2019 17:31:57 +0300 (0:00:00.181) 0:00:13.996 **** fatal: [undercloud-0]: FAILED! => { "changed": true, "cmd": "\"curl https://bootstrap.pypa.io/get-pip.py | python2\"", "delta": "0:00:00.011237", "end": "2019-09-28 10:31:58.071984", "rc": 127, "start": "2019-09-28 10:31:58.060747" } STDERR: /bin/sh: curl https://bootstrap.pypa.io/get-pip.py | python2: No such file or directory MSG: non-zero return code Change-Id: I280263782e846fb78dd51cdccfbb18aac2db3812
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
- name: Install pip using get-pip.py
|
|
become: yes
|
|
shell: |
|
|
curl https://bootstrap.pypa.io/get-pip.py | {{ python_ver }}
|
|
|
|
- name: Install required packages
|
|
become: yes
|
|
vars:
|
|
required_packages: ["{{ python_ver }}-virtualenv", 'git', 'gcc', "{{
|
|
python_ver }}-devel", 'wget']
|
|
yum:
|
|
name: "{{ required_packages }}"
|
|
state: present
|
|
|
|
- name: "Ensure {{ test.dir }} doesn't exist"
|
|
file:
|
|
path: "{{ test.dir }}"
|
|
state: absent
|
|
|
|
- name: Clone Tobiko project
|
|
git:
|
|
repo: 'https://review.opendev.org/x/tobiko'
|
|
dest: "{{ test.dir }}"
|
|
when: test.refsec == ''
|
|
|
|
- name: Checkout specific gerrit patch
|
|
git:
|
|
repo: 'https://review.opendev.org/x/tobiko'
|
|
dest: "{{ test.dir }}"
|
|
refspec: "{{ test.refsec }}"
|
|
version: 'FETCH_HEAD'
|
|
when: test.refsec != ''
|
|
|
|
- name: output gerrit patch log
|
|
shell: |
|
|
git log -n 1
|
|
register: git_log
|
|
args:
|
|
chdir: "{{ test.dir }}"
|
|
when: test.refsec != ''
|
|
|
|
- debug: var=git_log.stdout_lines
|
|
when: test.refsec != ''
|
|
|
|
- name: Create Virtualenv if python >= 3
|
|
vars:
|
|
packages: ['pip', 'setuptools', 'tox']
|
|
pip:
|
|
virtualenv: "{{ test.venv }}"
|
|
name: "{{ packages }}"
|
|
state: latest
|
|
when: ansible_python.version.major >=3
|
|
|
|
- name: Create Virtualenv if python <= 2
|
|
vars:
|
|
packages: ['pip', 'setuptools', 'tox<=2.5.0']
|
|
pip:
|
|
virtualenv: "{{ test.venv }}"
|
|
name: "{{ packages }}"
|
|
state: present
|
|
when: ansible_python.version.major <=2
|
|
|
|
- name: Install Tobiko
|
|
pip:
|
|
chdir: "{{ test.dir }}"
|
|
name: "."
|
|
virtualenv: "{{ test.venv }}"
|
|
editable: true
|
|
extra_args: "-c https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt -r {{ test.dir }}/requirements.txt"
|