Use virtualenv_path for all virtualenvs

This commit is contained in:
Mark Goddard 2017-07-28 12:23:17 +00:00
parent 26cd76a6c4
commit 19ceec45cd
17 changed files with 22 additions and 34 deletions

View File

@ -7,7 +7,7 @@
- name: Ensure baremetal compute node flavors are registered in nova
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
venv: "{{ virtualenv_path }}/shade"
flavor_base_name: baremetal-
roles:
- role: stackhpc.os-openstackclient

View File

@ -6,7 +6,7 @@
- name: Ensure compute nodes are available in ironic
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
venv: "{{ virtualenv_path }}/shade"
# Set this to a colon-separated list of compute node hostnames to provide.
# If unset, all compute nodes will be provided.
compute_node_limit: ""

View File

@ -7,7 +7,6 @@
# Set this variable to a space-separated list of regexes to override the
# default set of images.
container_image_regexes: ""
kolla_venv: "{{ ansible_env['PWD'] }}/kolla-venv"
kolla_build_log_path: "/var/log/kolla-build.log"
tasks:
- name: Set the container image sets to build if images regexes specified

View File

@ -2,11 +2,9 @@
- name: Ensure external network and subnet are registered in neutron
# Only required to run on a single host.
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
roles:
- role: neutron-net
neutron_net_venv: "{{ venv }}"
neutron_net_venv: "{{ virtualenv_path }}/shade"
neutron_net_openstack_auth_type: "{{ openstack_auth_type }}"
neutron_net_openstack_auth: "{{ openstack_auth }}"
# Network configuration.

View File

@ -19,6 +19,9 @@ kolla_ansible_source_url: "https://github.com/stackhpc/kolla-ansible"
# is 'source'.
kolla_ansible_source_version: "stackhpc-{{ kolla_openstack_release }}"
# Path to virtualenv in which to install kolla.
kolla_venv: "{{ virtualenv_path ~ '/kolla' }}"
###############################################################################
# Kolla configuration.

View File

@ -6,7 +6,7 @@
ipa_build_force: False
roles:
- role: ipa-build
ipa_build_venv: "{{ ansible_env['PWD'] }}/ipa-build-venv"
ipa_build_venv: "{{ virtualenv_path }}/ipa-build"
ipa_build_image_cache_path: "{{ image_cache_path }}"
ipa_build_source_checkout_path: "{{ source_checkout_path }}"
ipa_build_kernel_name: "{{ ipa_images_kernel_name }}"

View File

@ -40,7 +40,7 @@
roles:
- role: ipa-images
ipa_images_venv: "{{ ansible_env['PWD'] }}/shade-venv"
ipa_images_venv: "{{ virtualenv_path }}/shade"
ipa_images_openstack_auth_type: "{{ openstack_auth_type }}"
ipa_images_openstack_auth: "{{ openstack_auth }}"
ipa_images_cache_path: "{{ image_cache_path }}"

View File

@ -19,7 +19,6 @@
# Only required to run on a single host.
hosts: controllers_require_workaround_True[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
all_switch_interfaces: []
ironic_inspector_rules: []
# This rule template is used in a with_subelements loop.
@ -99,6 +98,6 @@
roles:
- role: ironic-inspector-rules
ironic_inspector_venv: "{{ venv }}"
ironic_inspector_venv: "{{ virtualenv_path }}/shade"
ironic_inspector_auth_type: "{{ openstack_auth_type }}"
ironic_inspector_auth: "{{ openstack_auth }}"

View File

@ -1,9 +1,9 @@
---
- name: Ensure openstackclient is installed
- name: Ensure introspection rules are registered in Ironic Inspector
# Only required to run on a single host.
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
venv: "{{ virtualenv_path }}/shade"
pre_tasks:
- name: Validate OpenStack password authentication parameters
fail:
@ -18,16 +18,9 @@
tags:
- config-validation
roles:
- role: stackhpc.os-openstackclient
- include_role: stackhpc.os-openstackclient
os_openstackclient_venv: "{{ venv }}"
- name: Ensure introspection rules are registered in Ironic Inspector
# Only required to run on a single host.
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
pre_tasks:
- name: Retrieve the IPA kernel Glance image UUID
shell: >
source {{ venv }}/bin/activate &&

View File

@ -2,8 +2,6 @@
- name: Ensure provisioning network and subnet are registered in neutron
# Only required to run on a single host.
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
pre_tasks:
- name: Validate OpenStack password authentication parameters
fail:
@ -20,7 +18,7 @@
roles:
- role: stackhpc.os-networks
os_networks_venv: "{{ venv }}"
os_networks_venv: "{{ virtualenv_path }}/shade"
os_networks_auth_type: "{{ openstack_auth_type }}"
os_networks_auth: "{{ openstack_auth }}"
# Network configuration.

View File

@ -12,7 +12,7 @@ kolla_ansible_source_url:
# is 'source'.
kolla_ansible_source_version:
# Virtualenv directory where Kolla will be installed.
# Virtualenv directory where Kolla-ansible will be installed.
kolla_venv: "{{ ansible_env['PWD'] }}/kolla-venv"
# Password to use to encrypt the passwords.yml file.

View File

@ -1,11 +1,9 @@
---
- name: Ensure introspection rules are registered in Bifrost
hosts: seed
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
roles:
- role: ironic-inspector-rules
ironic_inspector_venv: "{{ venv }}"
ironic_inspector_venv: "{{ virtualenv_path }}/shade"
# No auth required for Bifrost.
ironic_inspector_auth_type: None
ironic_inspector_auth: {}

View File

@ -2,7 +2,7 @@
- name: Ensure CentOS cloud image is registered with Glance
hosts: controllers[0]
vars:
os_shade_venv: "{{ ansible_env['PWD'] }}/shade-venv"
os_shade_venv: "{{ virtualenv_path }}/shade"
roles:
- role: stackhpc.os-shade
tasks:

View File

@ -16,7 +16,7 @@
- grub2
image_extra_elements: []
image_elements: "{{ image_base_elements + (image_whole_disk_elements if image_is_whole_disk|bool else image_partition_elements) + image_extra_elements }}"
os_shade_venv: "{{ ansible_env['PWD'] }}/shade-venv"
os_shade_venv: "{{ virtualenv_path }}/shade"
roles:
- role: stackhpc.os-shade
tasks:

View File

@ -3,7 +3,7 @@
hosts: controllers[0]
vars:
public_key_path: "{{ ssh_public_key_path }}"
os_shade_venv: "{{ ansible_env['PWD'] }}/shade-venv"
os_shade_venv: "{{ virtualenv_path }}/shade"
roles:
- role: stackhpc.os-shade
tasks:

View File

@ -2,7 +2,6 @@
- name: Ensure a test project exists
hosts: controllers[0]
vars:
venv: "{{ ansible_env.PWD }}/shade-venv"
# Dict of quotas to set for the test project.
test_project_quotas:
cores: -1
@ -52,7 +51,7 @@
roles:
- role: stackhpc.os-projects
os_projects_venv: "{{ venv }}"
os_projects_venv: "{{ virtualenv_path }}/shade"
os_projects_auth_type: "{{ openstack_auth_type }}"
os_projects_admin_auth: "{{ openstack_auth }}"
os_projects:

View File

@ -25,7 +25,7 @@ DEFAULT_CONFIG_PATH = "/etc/kolla"
CONFIG_PATH_ENV = "KOLLA_CONFIG_PATH"
DEFAULT_VENV_PATH = "ansible/kolla-venv"
DEFAULT_VENV_PATH = "/opt/kayobe/venvs/kolla"
VENV_PATH_ENV = "KOLLA_VENV"
@ -54,7 +54,8 @@ def add_args(parser):
"values in Kolla Ansible")
parser.add_argument("--kolla-venv", metavar="VENV", default=default_venv,
help="path to virtualenv where Kolla Ansible is "
"installed")
"installed (default=$%s or %s)" %
(VENV_PATH_ENV, DEFAULT_VENV_PATH))
def _get_inventory_path(parsed_args, inventory_filename):