Clean up injected role vars

Injected role vars, in cases where the vars were not generated
within the playbook run, are not ideal. In the case of our venv vars,
it removes the ability for a deploy to manipulate the venv download
tag or path using group vars.

This cleanup standardizes the venv tag and download url vars using
group vars.
I also removed several unnecessary definitions of
pip_lock_to_internal_repo in the playbooks since it is already
defined in the group_vars/all.yml.

Change-Id: Iddf27179d5babb91f4518202bdae5855f110b958
This commit is contained in:
Logan V 2016-12-21 11:21:07 -06:00
parent 64376f923d
commit 91e3de51f2
40 changed files with 96 additions and 47 deletions

View File

@ -115,6 +115,10 @@ dhcp_domain: openstacklocal
## LDAP enabled toggle
service_ldap_backend_enabled: "{{ keystone_ldap is defined and keystone_ldap.Default is defined }}"
## Base venv configuration
venv_tag: "{{ openstack_release }}"
venv_base_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}"
## Aodh
aodh_service_region: "{{ service_region }}"
aodh_galera_user: aodh

View File

@ -18,3 +18,7 @@ aodh_service_publicuri: "{{ openstack_service_publicuri_proto|default(aodh_servi
# Ensure that the package state matches the global setting
aodh_package_state: "{{ package_state }}"
# venv fetch configuration
aodh_venv_tag: "{{ venv_tag }}"
aodh_venv_download_url: "{{ venv_base_download_url }}/aodh-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -27,3 +27,7 @@ barbican_rabbitmq_servers: "{{ rabbitmq_servers }}"
barbican_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
barbican_rabbitmq_userid: barbican
barbican_rabbitmq_vhost: /barbican
# venv fetch configuration
barbican_venv_tag: "{{ venv_tag }}"
barbican_venv_download_url: "{{ venv_base_download_url }}/barbican-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -27,3 +27,7 @@ swift_rabbitmq_telemetry_use_ssl: "{{ rabbitmq_use_ssl }}"
# Ensure that the package state matches the global setting
ceilometer_package_state: "{{ package_state }}"
# venv fetch configuration
ceilometer_venv_tag: "{{ venv_tag }}"
ceilometer_venv_download_url: "{{ venv_base_download_url }}/ceilometer-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -13,6 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cinder_management_address: "{{ ansible_host }}"
cinder_glance_host: "{{ internal_lb_vip_address }}"
cinder_glance_service_port: "{{ glance_service_port }}"
# If there are Swift hosts in the environment, then use it as the default Glance store
# This is specifically duplicated from glance_all for the cinder_glance_api_version
# setting below.
@ -26,3 +31,7 @@ cinder_glance_api_version: "{{ (cinder_backends_rbd_inuse|bool and glance_defaul
# Ensure that the package state matches the global setting
cinder_package_state: "{{ package_state }}"
# venv fetch configuration
cinder_venv_tag: "{{ venv_tag }}"
cinder_venv_download_url: "{{ venv_base_download_url }}/cinder-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -50,3 +50,7 @@ designate_ceilometer_enabled: "{{ (groups['designate_all'] is defined) and (grou
# Ensure that the package state matches the global setting
designate_package_state: "{{ package_state }}"
# venv fetch configuration
designate_venv_tag: "{{ venv_tag }}"
designate_venv_download_url: "{{ venv_base_download_url }}/designate-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -21,3 +21,7 @@ glance_default_store: "{{ ((groups['swift_all'] is defined) and (groups['swift_a
# Ensure that the package state matches the global setting
glance_package_state: "{{ package_state }}"
# venv fetch configuration
glance_venv_tag: "{{ venv_tag }}"
glance_venv_download_url: "{{ venv_base_download_url }}/glance-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -27,3 +27,6 @@ gnocchi_package_state: "{{ package_state }}"
# Ensure that keystone authentication is enabled for gnocchi
gnocchi_keystone_auth: "{{ (groups['keystone_all'] is defined) and (groups['keystone_all'] | length > 0) }}"
# venv fetch configuration
gnocchi_venv_tag: "{{ venv_tag }}"
gnocchi_venv_download_url: "{{ venv_base_download_url }}/gnocchi-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -22,3 +22,7 @@ heat_package_state: "{{ package_state }}"
# Only enable the heat cinder backups functionality if the cinder backup
# service is enabled.
heat_cinder_backups_enabled: "{{ (cinder_service_backup_program_enabled is defined and cinder_service_backup_program_enabled | bool) | ternary(True, False) }}"
# venv fetch configuration
heat_venv_tag: "{{ venv_tag }}"
heat_venv_download_url: "{{ venv_base_download_url }}/heat-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -35,3 +35,7 @@ horizon_package_state: "{{ package_state }}"
horizon_enable_sahara_ui: "{{ (groups['sahara_all'] is defined) and (groups['sahara_all'] | length > 0) }}"
# If there are any Trove hosts in the environment, then enable trove-dashboard
horizon_enable_trove_ui: "{{ (groups['trove_all'] is defined) and (groups['trove_all'] | length > 0) }}"
# venv fetch configuration
horizon_venv_tag: "{{ venv_tag }}"
horizon_venv_download_url: "{{ venv_base_download_url }}/horizon-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -19,3 +19,7 @@ ironic_service_adminurl: "{{ ironic_service_adminuri }}/v1"
# Ensure that the package state matches the global setting
ironic_package_state: "{{ package_state }}"
# venv fetch configuration
ironic_venv_tag: "{{ venv_tag }}"
ironic_venv_download_url: "{{ venv_base_download_url }}/ironic-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -21,3 +21,7 @@ keystone_service_in_ldap: "{{ service_ldap_backend_enabled }}"
# Ensure that the package state matches the global setting
keystone_package_state: "{{ package_state }}"
# venv fetch configuration
keystone_venv_tag: "{{ venv_tag }}"
keystone_venv_download_url: "{{ venv_base_download_url }}/keystone-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -26,3 +26,7 @@ magnum_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
# Ensure that the package state matches the global setting
magnum_package_state: "{{ package_state }}"
# venv fetch configuration
magnum_venv_tag: "{{ venv_tag }}"
magnum_venv_download_url: "{{ venv_base_download_url }}/magnum-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -22,3 +22,7 @@ neutron_galera_address: "{{ galera_address }}"
# Ensure that the package state matches the global setting
neutron_package_state: "{{ package_state }}"
# venv fetch configuration
neutron_venv_tag: "{{ venv_tag }}"
neutron_venv_download_url: "{{ venv_base_download_url }}/neutron-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -21,3 +21,7 @@ nova_glance_api_servers: "{{ glance_api_servers }}"
# Ensure that the package state matches the global setting
nova_package_state: "{{ package_state }}"
# venv fetch configuration
nova_venv_tag: "{{ venv_tag }}"
nova_venv_download_url: "{{ venv_base_download_url }}/nova-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -0,0 +1,18 @@
---
# Copyright 2016, Logan Vig <logan2211@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# venv fetch configuration
rally_venv_tag: "{{ venv_tag }}"
rally_venv_download_url: "{{ venv_base_download_url }}/rally-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -15,3 +15,7 @@ sahara_service_region: "{{ service_region }}"
sahara_service_in_ldap: "{{ service_ldap_backend_enabled }}"
sahara_galera_address: "{{ galera_address }}"
# venv fetch configuration
sahara_venv_tag: "{{ venv_tag }}"
sahara_venv_download_url: "{{ venv_base_download_url }}/sahara-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -25,3 +25,7 @@ swift_rabbitmq_telemetry_use_ssl: False
# Used to optionally filter Gnocchi-originated traffic in Ceilometermiddleware
swift_gnocchi_enabled: "{{ (groups['gnocchi_all'] is defined and groups['gnocchi_all'] | length > 0) }}"
# venv fetch configuration
swift_venv_tag: "{{ venv_tag }}"
swift_venv_download_url: "{{ venv_base_download_url }}/swift-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -40,3 +40,7 @@ trove_ceilometer_enabled: "{{ (groups['trove_all'] is defined) and (groups['trov
# Ensure that the package state matches the global setting
trove_package_state: "{{ package_state }}"
# venv fetch configuration
trove_venv_tag: "{{ venv_tag }}"
trove_venv_download_url: "{{ venv_base_download_url }}/trove-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"

View File

@ -53,7 +53,9 @@ tempest_service_available_swift: "{{ groups['swift_all'] is defined and groups['
tempest_log_dir: /var/log/utility
tempest_venv_tag: "{{ openstack_release }}"
tempest_venv_download_url: "{{ venv_base_download_url }}/tempest-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
tempest_venv_bin: "/openstack/venvs/tempest-{{ tempest_venv_tag }}/bin"
tempest_git_repo: "{{ openstack_repo_git_url }}/tempest"
# This sets the tempest group to the utility group
tempest_main_group: utility_all

View File

@ -46,8 +46,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_aodh"
aodh_venv_tag: "{{ openstack_release }}"
aodh_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/aodh-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -46,8 +46,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_barbican"
barbican_venv_tag: "{{ openstack_release }}"
barbican_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/barbican-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -38,8 +38,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_ceilometer"
ceilometer_venv_tag: "{{ openstack_release }}"
ceilometer_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/ceilometer-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -120,12 +120,7 @@
when: cinder_backend_lvm_inuse | bool
roles:
- role: "os_cinder"
cinder_venv_tag: "{{ openstack_release }}"
cinder_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/cinder-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
cinder_management_address: "{{ ansible_host }}"
cinder_storage_address: "{{ storage_address }}"
cinder_glance_host: "{{ internal_lb_vip_address }}"
cinder_glance_service_port: "{{ glance_service_port }}"
- role: "ceph_client"
openstack_service_system_user: "{{ cinder_system_user_name }}"
openstack_service_venv_bin: "/openstack/venvs/cinder-{{ openstack_release }}/bin"

View File

@ -69,8 +69,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_designate"
designate_venv_tag: "{{ openstack_release }}"
designate_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/designate-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -70,8 +70,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_glance"
glance_venv_tag: "{{ openstack_release }}"
glance_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/glance-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -52,8 +52,6 @@
tags:
- ceph
- role: "os_gnocchi"
gnocchi_venv_tag: "{{ openstack_release }}"
gnocchi_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/gnocchi-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -59,8 +59,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_heat"
heat_venv_tag: "{{ openstack_release }}"
heat_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/heat-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: heat_log_rotate
rsyslog_client_log_dir: "/var/log/heat"

View File

@ -36,8 +36,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_horizon"
horizon_venv_tag: "{{ openstack_release }}"
horizon_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/horizon-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: horizon_log_rotate
rsyslog_client_log_dir: "/var/log/horizon"

View File

@ -40,8 +40,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_ironic"
ironic_venv_tag: "{{ openstack_release }}"
ironic_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/ironic-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -78,8 +78,6 @@
when: is_metal | bool
roles:
- role: "os_keystone"
keystone_venv_tag: "{{ openstack_release }}"
keystone_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/keystone-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -47,8 +47,6 @@
when: inventory_hostname == groups['magnum_all'][0]
roles:
- role: "os_magnum"
magnum_venv_tag: "{{ openstack_release }}"
magnum_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/magnum-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc

View File

@ -133,8 +133,6 @@
- always
roles:
- role: "os_neutron"
neutron_venv_tag: "{{ openstack_release }}"
neutron_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/neutron-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
neutron_overlay_network: "{{ _overlay_network }}"
neutron_provider_networks: "{{ _provider_networks }}"
neutron_local_ip: "{{ _local_ip|default('127.0.0.1') }}"

View File

@ -156,8 +156,6 @@
nova_spicehtml5_git_repo: "{{ openstack_repo_git_url }}/spice-html5"
nova_spicehtml5_git_install_branch: "{{ spicehtml5_git_install_branch }}"
nova_management_address: "{{ management_address }}"
nova_venv_tag: "{{ openstack_release }}"
nova_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/nova-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "ceph_client"
openstack_service_system_user: "{{ nova_system_user_name }}"
openstack_service_venv_bin: "/openstack/venvs/nova-{{ openstack_release }}/bin"

View File

@ -28,7 +28,3 @@
when: inventory_hostname == groups['utility_all'][0]
roles:
- role: "os_rally"
rally_venv_tag: "{{ openstack_release }}"
rally_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/rally-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
vars:
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"

View File

@ -56,8 +56,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_sahara"
sahara_venv_tag: "{{ openstack_release }}"
sahara_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/sahara-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc
@ -69,6 +67,5 @@
- rsyslog
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"
tags:
- sahara

View File

@ -47,13 +47,10 @@
- always
roles:
- role: "os_swift"
swift_venv_tag: "{{ openstack_release }}"
swift_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/swift-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
swift_do_setup: True
swift_do_sync: True
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"
tags:
- swift

View File

@ -24,7 +24,6 @@
- role: "os_swift"
swift_do_setup: False
swift_do_sync: True
swift_venv_tag: "{{ openstack_release }}"
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
tags:

View File

@ -20,8 +20,6 @@
user: root
roles:
- role: "os_tempest"
tempest_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/tempest-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
tempest_git_repo: "{{ openstack_repo_git_url }}/tempest"
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: utility_log_rotate
rsyslog_client_log_dir: "{{ tempest_log_dir }}"

View File

@ -61,8 +61,6 @@
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_trove"
trove_venv_tag: "{{ openstack_release }}"
trove_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/trove-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
- role: "openstack_openrc"
tags:
- openrc
@ -74,6 +72,5 @@
- rsyslog
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"
tags:
- trove