Don't install bifrost into local virtualenv
Bifrost is no longer required to be installed locally.
This commit is contained in:
parent
aa334068c2
commit
20a8436d0f
@ -7,14 +7,6 @@
|
||||
- { name: agent_ipmitool, enabled: "{{ kolla_bifrost_enable_ipmitool_drivers | bool }}" }
|
||||
|
||||
pre_tasks:
|
||||
- name: Fail if not running in a virtualenv
|
||||
fail:
|
||||
msg: >
|
||||
This playbook should be executed from a virtualenv in order to avoid
|
||||
installing python packages to the system location. Typically this
|
||||
will be named 'kayobe-venv'
|
||||
when: "{{ not lookup('env', 'VIRTUAL_ENV') }}"
|
||||
|
||||
- name: Check whether a Kolla Bifrost extra globals configuration file exists
|
||||
stat:
|
||||
path: "{{ kolla_bifrost_extra_globals_path }}"
|
||||
@ -31,8 +23,6 @@
|
||||
roles:
|
||||
- role: kolla-bifrost
|
||||
|
||||
kolla_bifrost_venv: "{{ lookup('env', 'VIRTUAL_ENV') }}"
|
||||
|
||||
# Generate a list of enabled drivers from the map.
|
||||
kolla_bifrost_enabled_drivers: >
|
||||
{{ kolla_bifrost_driver_map | selectattr('enabled') | map(attribute='name') | list }}
|
||||
|
@ -1,16 +1,4 @@
|
||||
---
|
||||
# Path to directory for source code checkouts.
|
||||
source_checkout_path:
|
||||
|
||||
# Virtualenv directory where Bifrost will be installed.
|
||||
kolla_bifrost_venv:
|
||||
|
||||
# URL of Bifrost source code repository.
|
||||
kolla_bifrost_source_url:
|
||||
|
||||
# Version (branch, tag, etc.) of Bifrost source code repository.
|
||||
kolla_bifrost_source_version:
|
||||
|
||||
# Directory where Kolla custom configuration files will be installed.
|
||||
kolla_node_custom_config_path:
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
- name: Ensure the Kolla Bifrost configuration directores exist
|
||||
file:
|
||||
path: "{{ kolla_node_custom_config_path }}/bifrost"
|
||||
state: directory
|
||||
mode: 0750
|
||||
|
||||
- name: Ensure the Kolla Bifrost configuration files exist
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ kolla_node_custom_config_path }}/bifrost/{{ item.dest }}"
|
||||
mode: 0640
|
||||
with_items:
|
||||
- { src: bifrost.yml.j2, dest: bifrost.yml }
|
||||
- { src: dib.yml.j2, dest: dib.yml }
|
||||
- { src: servers.yml.j2, dest: servers.yml }
|
@ -1,53 +0,0 @@
|
||||
---
|
||||
- name: Ensure EPEL repo is installed
|
||||
yum:
|
||||
name: epel-release
|
||||
state: installed
|
||||
become: True
|
||||
|
||||
- name: Ensure required packages are installed
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
become: True
|
||||
with_items:
|
||||
- gcc
|
||||
- libffi-devel
|
||||
- openssl-devel
|
||||
- python-devel
|
||||
- python-pip
|
||||
- python-virtualenv
|
||||
|
||||
- name: Ensure source code checkout path exists
|
||||
file:
|
||||
path: "{{ source_checkout_path }}"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
recurse: True
|
||||
become: True
|
||||
|
||||
- name: Ensure Bifrost source code checkout exists
|
||||
git:
|
||||
repo: "{{ kolla_bifrost_source_url }}"
|
||||
dest: "{{ source_checkout_path }}/bifrost"
|
||||
version: "{{ kolla_bifrost_source_version }}"
|
||||
|
||||
- name: Ensure the latest version of pip is installed
|
||||
pip:
|
||||
name: "{{ item.name }}"
|
||||
state: latest
|
||||
virtualenv: "{{ kolla_bifrost_venv }}"
|
||||
with_items:
|
||||
- { name: pip }
|
||||
|
||||
- name: Ensure required Python packages are installed
|
||||
pip:
|
||||
name: "{{ item.name }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
state: present
|
||||
virtualenv: "{{ kolla_bifrost_venv }}"
|
||||
with_items:
|
||||
# Intall Bifrost from source.
|
||||
- name: "{{ source_checkout_path }}/bifrost"
|
||||
- name: shade
|
@ -1,8 +1,16 @@
|
||||
---
|
||||
- include: install.yml
|
||||
tags:
|
||||
- install
|
||||
- name: Ensure the Kolla Bifrost configuration directores exist
|
||||
file:
|
||||
path: "{{ kolla_node_custom_config_path }}/bifrost"
|
||||
state: directory
|
||||
mode: 0750
|
||||
|
||||
- include: config.yml
|
||||
tags:
|
||||
- config
|
||||
- name: Ensure the Kolla Bifrost configuration files exist
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ kolla_node_custom_config_path }}/bifrost/{{ item.dest }}"
|
||||
mode: 0640
|
||||
with_items:
|
||||
- { src: bifrost.yml.j2, dest: bifrost.yml }
|
||||
- { src: dib.yml.j2, dest: dib.yml }
|
||||
- { src: servers.yml.j2, dest: servers.yml }
|
||||
|
Loading…
Reference in New Issue
Block a user