Fix Ceilometer deployments

When deploying ceilometer and swift the both ceilometer and swift need
access to a few shared variables. This change uses the established
pattern which proxies the shared options through localhost hostvars
which allows the respective roles and playbooks to inherited the
required options.

Change-Id: I4cb12cbf0063928e52657125b007bbeaf175de19
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-10-18 21:49:41 -05:00 committed by Kevin Carter (cloudnull)
parent c5c7388bdc
commit 4bdc86e009
4 changed files with 52 additions and 6 deletions

View File

@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ceilometer_service_user_name: ceilometer
ceilometer_service_tenant_name: service
ceilometer_service_user_name: "{{ hostvars['localhost']['ceilometer_service_user_name'] }}"
ceilometer_service_tenant_name: "{{ hostvars['localhost']['ceilometer_service_tenant_name'] }}"
# These are here rather than in ceilometer_all because
# both the os_ceilometer and os_swift roles require them
@ -46,3 +46,9 @@ ceilometer_venv_download_url: "{{ venv_base_download_url }}/ceilometer-{{ openst
# locations for fetching the default files from the git source
ceilometer_git_config_lookup_location: "{{ openstack_repo_url }}/openstackgit/ceilometer"
# Swift vars used when swift is enabled
swift_system_user_name: "{{ hostvars['localhost']['swift_system_user_name'] }}"
swift_system_shell: "{{ hostvars['localhost']['swift_system_shell'] }}"
swift_system_comment: "{{ hostvars['localhost']['swift_system_comment'] }}"
swift_system_home_folder: "{{ hostvars['localhost']['swift_system_home_folder'] }}"

View File

@ -14,10 +14,10 @@
# limitations under the License.
swift_proxy_port: 8080
swift_system_user_name: swift
swift_system_shell: /bin/bash
swift_system_comment: swift system user
swift_system_home_folder: "/var/lib/{{ swift_system_user_name }}"
swift_system_user_name: "{{ hostvars['localhost']['swift_system_user_name'] }}"
swift_system_shell: "{{ hostvars['localhost']['swift_system_shell'] }}"
swift_system_comment: "{{ hostvars['localhost']['swift_system_comment'] }}"
swift_system_home_folder: "{{ hostvars['localhost']['swift_system_home_folder'] }}"
# Swift Telemetry notifications
swift_rabbitmq_telemetry_userid: "swift"
@ -44,3 +44,7 @@ swift_gnocchi_enabled: "{{ (groups['gnocchi_all'] is defined and groups['gnocchi
# venv fetch configuration
swift_venv_tag: "{{ venv_tag }}"
swift_venv_download_url: "{{ venv_base_download_url }}/swift-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
# Ceilometer vars used when ceilometer is enabled
ceilometer_service_user_name: "{{ hostvars['localhost']['ceilometer_service_user_name'] }}"
ceilometer_service_tenant_name: "{{ hostvars['localhost']['ceilometer_service_tenant_name'] }}"

View File

@ -0,0 +1,17 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# 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.
ceilometer_service_user_name: ceilometer
ceilometer_service_tenant_name: service

View File

@ -0,0 +1,19 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# 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.
swift_system_user_name: swift
swift_system_shell: /bin/bash
swift_system_comment: swift system user
swift_system_home_folder: "/var/lib/{{ swift_system_user_name }}"