Merge "Fix initial python/venv dependencies"
This commit is contained in:
commit
1a41a65fd7
@ -3,6 +3,33 @@
|
|||||||
name: "Install Ironic on the target host."
|
name: "Install Ironic on the target host."
|
||||||
become: yes
|
become: yes
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
|
vars:
|
||||||
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
|
ansible_python_interpreter: "/usr/bin/env python3"
|
||||||
|
pre_tasks:
|
||||||
|
- name: install pip (and venv) to system
|
||||||
|
package:
|
||||||
|
name: "{{ packages | select | list }}"
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- python3-pip
|
||||||
|
- "{{ (ansible_facts['os_family'] == 'Debian') | ternary('python3-venv', '') }}"
|
||||||
|
|
||||||
|
- name: create venv
|
||||||
|
command: python3 -m venv {{ bifrost_venv_dir }}
|
||||||
|
args:
|
||||||
|
creates: "{{ bifrost_venv_dir }}/bin/python3"
|
||||||
|
|
||||||
|
# NOTE(ebbex): (incase it's missing, which it shouldn't normally be)
|
||||||
|
- name: install setuptools in venv
|
||||||
|
command: "{{ bifrost_venv_dir }}/bin/pip3 install setuptools"
|
||||||
|
args:
|
||||||
|
creates: "{{ bifrost_venv_dir }}/lib/python*/site-packages/setuptools"
|
||||||
|
|
||||||
|
- name: override ansible_python_interpreter to venv
|
||||||
|
set_fact:
|
||||||
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: bifrost-prep-for-install
|
- role: bifrost-prep-for-install
|
||||||
when: not (skip_install | default(false) | bool)
|
when: not (skip_install | default(false) | bool)
|
||||||
|
@ -15,7 +15,6 @@ required_packages:
|
|||||||
- python3-dev
|
- python3-dev
|
||||||
- python3-mysqldb
|
- python3-mysqldb
|
||||||
- python3-pymysql
|
- python3-pymysql
|
||||||
- python3-setuptools
|
|
||||||
- libffi-dev
|
- libffi-dev
|
||||||
- libxslt1-dev
|
- libxslt1-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
@ -33,7 +32,6 @@ required_packages:
|
|||||||
- uuid-runtime
|
- uuid-runtime
|
||||||
- curl
|
- curl
|
||||||
- socat
|
- socat
|
||||||
- python3-pip
|
|
||||||
- gcc
|
- gcc
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- apache2-utils
|
- apache2-utils
|
||||||
|
@ -33,7 +33,6 @@ required_packages:
|
|||||||
- python3-libselinux
|
- python3-libselinux
|
||||||
- python3-policycoreutils
|
- python3-policycoreutils
|
||||||
- gcc
|
- gcc
|
||||||
- python3-pip
|
|
||||||
- socat
|
- socat
|
||||||
- firewalld
|
- firewalld
|
||||||
- python3-firewall
|
- python3-firewall
|
||||||
|
Loading…
Reference in New Issue
Block a user