71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
---
|
|
# get python_v fact used with vars/common.yaml to get
|
|
# python2 or python3 packages in below tasks
|
|
- name: Get python_v fact for py2 or py3 common vars
|
|
include_tasks: check_set_py3.yaml
|
|
|
|
- name: Make sure workspace exists
|
|
file:
|
|
path: '{{ workspace }}'
|
|
state: directory
|
|
|
|
- name: Install pip and virtualenv
|
|
become: true
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop:
|
|
- "{{ python_version[python_v] }}-pip"
|
|
- "{{ python_version[python_v] }}-virtualenv"
|
|
|
|
- when: python_v == "py2"
|
|
block:
|
|
|
|
- name: Install PyYAML for python2
|
|
package:
|
|
name: PyYAML
|
|
state: present
|
|
become: true
|
|
|
|
- when: python_v == "py3"
|
|
block:
|
|
|
|
- name: Install PyYAML for python3
|
|
package:
|
|
name: python3-pyyaml
|
|
state: present
|
|
become: true
|
|
|
|
- name: Install python3-devel with provides pathfix.py
|
|
package:
|
|
name: python3-devel
|
|
state: present
|
|
become: true
|
|
|
|
- name: Create a script that fixes shebang for python3
|
|
template:
|
|
src: pathfix_repos.sh.j2
|
|
dest: "{{ workspace }}/pathfix_repos.sh"
|
|
mode: u=rwx
|
|
|
|
- name: Fix shebang path for python3
|
|
command: bash {{ workspace }}/pathfix_repos.sh
|
|
|
|
- name: Install deps from upper-constraints
|
|
when: ansible_distribution == 'CentOS'
|
|
pip:
|
|
extra_args: "-c {{ openstack_git_root }}/requirements/upper-constraints.txt"
|
|
requirements: "{{ openstack_git_root }}/{{ item }}/requirements.txt"
|
|
virtualenv: "{{ workspace }}/venv"
|
|
with_items:
|
|
- diskimage-builder
|
|
- python-tripleoclient
|
|
- tripleo-common
|
|
|
|
|
|
- name: pip install tripleo items
|
|
pip:
|
|
name: "{{ tripleo_pip_projects }}"
|
|
state: present
|
|
virtualenv: "{{ workspace }}/venv"
|