openstack-ansible-os_ceilom.../vars/main.yml
Dmitriy Rabotjagov ed4d7ed536 Cleanup files and templates using smart sources
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.

  * Source installs have the configuration files within the venv at
    "<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
    default configuration path to this directory. When the service is
    upgraded the link will move to the new venv path.
  * Distro installs package all of the required configuration files.

To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.

Change-Id: Ia467e20c32732152a03579216a0ced0dbb4038c4
2019-02-04 21:25:57 +02:00

77 lines
4.1 KiB
YAML

---
# 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.
# These vars find a file on the deployment node, if it exists - otherwise the result is empty.
ceilometer_data_meters_user_content: "{{ lookup('pipe', 'cat ' ~ ceilometer_data_meters_default_file_path ~ ' 2>/dev/null || true') }}"
ceilometer_event_definitions_user_content: "{{ lookup('pipe', 'cat ' ~ ceilometer_event_definitions_default_file_path ~ ' 2>/dev/null || true') }}"
ceilometer_gnocchi_resources_user_content: "{{ lookup('pipe', 'cat ' ~ ceilometer_gnocchi_resources_default_file_path ~ ' 2>/dev/null || true') }}"
ceilometer_loadbalancer_v2_meter_definitions_user_content: "{{ lookup('pipe', 'cat ' ~ ceilometer_loadbalancer_v2_meter_definitions_default_file_path ~ ' 2>/dev/null || true') }}"
ceilometer_osprofiler_event_definitions_user_content: "{{ lookup('pipe', 'cat ' ~ ceilometer_osprofiler_event_definitions_default_file_path ~ ' 2>/dev/null || true') }}"
ceilometer_polling_user_content: "{{ lookup('pipe', 'cat ' ~ ceilometer_polling_default_file_path ~ ' 2>/dev/null || true') }}"
_ceilometer_rootwrap_conf_overrides:
DEFAULT:
filters_path: "/etc/ceilometer/rootwrap.d,/usr/share/ceilometer/rootwrap"
exec_dirs: "{{ ceilometer_bin }},/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin"
ceilometer_core_files:
- tmp_f: "/tmp/rootwrap.conf"
source_f: "/etc/ceilometer/rootwrap.conf"
config_overrides: "{{ _ceilometer_rootwrap_conf_overrides | combine(ceilometer_rootwrap_conf_overrides, recursive=True) }}"
config_type: "ini"
owner: "root"
group: "{{ ceilometer_system_group_name }}"
mode: "0640"
- tmp_f: "/tmp/polling.yaml"
source_f: "/etc/ceilometer/polling.yaml"
config_overrides: "{{ ceilometer_polling_yaml_overrides }}"
config_type: "yaml"
list_extend: false
content: "{{ ceilometer_polling_user_content }}"
- tmp_f: "/tmp/loadbalancer_v2_meter_definitions.yaml"
source_f: "/etc/ceilometer/examples/loadbalancer_v2_meter_definitions.yaml"
target_f: "/etc/ceilometer/loadbalancer_v2_meter_definitions.yaml"
config_overrides: "{{ ceilometer_loadbalancer_v2_meter_definitions_yaml_overrides }}"
config_type: "yaml"
list_extend: false
content: "{{ ceilometer_loadbalancer_v2_meter_definitions_user_content }}"
condition: "{{ ceilometer_install_method == 'source' }}"
- tmp_f: "/tmp/osprofiler_event_definitions.yaml"
source_f: "/etc/ceilometer/examples/osprofiler_event_definitions.yaml"
target_f: "/etc/ceilometer/osprofiler_event_definitions.yaml"
config_overrides: "{{ ceilometer_osprofiler_event_definitions_yaml_overrides }}"
config_type: "yaml"
list_extend: false
content: "{{ ceilometer_osprofiler_event_definitions_user_content }}"
condition: "{{ ceilometer_install_method == 'source' }}"
- tmp_f: "/tmp/meters.yaml"
source_f: "{{ ceilometer_lib_dir }}/ceilometer/data/meters.d/meters.yaml"
config_overrides: "{{ ceilometer_data_meters_yaml_overrides }}"
config_type: "yaml"
list_extend: false
content: "{{ ceilometer_data_meters_user_content }}"
- tmp_f: "/tmp/event_definitions.yaml"
source_f: "{{ ceilometer_lib_dir }}/ceilometer/pipeline/data/event_definitions.yaml"
config_overrides: "{{ ceilometer_event_definitions_yaml_overrides }}"
config_type: "yaml"
list_extend: false
content: "{{ ceilometer_event_definitions_user_content }}"
- tmp_f: "/tmp/gnocchi_resources.yaml"
source_f: "{{ ceilometer_lib_dir }}/ceilometer/publisher/data/gnocchi_resources.yaml"
config_overrides: "{{ ceilometer_gnocchi_resources_yaml_overrides }}"
config_type: "yaml"
list_extend: false
content: "{{ ceilometer_gnocchi_resources_user_content }}"