/home/zuul/src/opendev.org/openstack/openstack-ansible-os_ceilometer/defaults/main.yml
---
# Copyright 2014, 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.

## Verbosity Options
debug: False

# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
ceilometer_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
ceilometer_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((ceilometer_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"

# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
ceilometer_package_state: "latest"
ceilometer_pip_package_state: "latest"

# Set installation method.
ceilometer_install_method: "source"
ceilometer_venv_python_executable: "{{ openstack_venv_python_executable | default('python2') }}"

## The git source/branch
ceilometer_git_repo: https://opendev.org/openstack/ceilometer
ceilometer_git_install_branch: master

## The packages to build from source
ceilometer_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
ceilometer_git_constraints:
  - "git+{{ ceilometer_git_repo }}@{{ ceilometer_git_install_branch }}#egg=ceilometer"
  - "--constraint {{ ceilometer_upper_constraints_url }}"

ceilometer_pip_install_args: "{{ pip_install_options | default('') }}"

# Name of the virtual env to deploy into
ceilometer_venv_tag: "{{ venv_tag | default('untagged') }}"
ceilometer_bin: "{{ _ceilometer_bin }}"

## System info
ceilometer_system_user_name: ceilometer
ceilometer_system_group_name: ceilometer
ceilometer_system_shell: /bin/false
ceilometer_system_comment: ceilometer system user
ceilometer_system_user_home: "/var/lib/{{ ceilometer_system_user_name }}"

## Oslo Messaging info

# RPC
ceilometer_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
ceilometer_oslomsg_rpc_setup_host: "{{ (ceilometer_oslomsg_rpc_host_group in groups) | ternary(groups[ceilometer_oslomsg_rpc_host_group][0], 'localhost') }}"
ceilometer_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
ceilometer_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
ceilometer_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
ceilometer_oslomsg_rpc_userid: ceilometer
ceilometer_oslomsg_rpc_vhost: /ceilometer

# Notify
ceilometer_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
ceilometer_oslomsg_notify_setup_host: "{{ (ceilometer_oslomsg_notify_host_group in groups) | ternary(groups[ceilometer_oslomsg_notify_host_group][0], 'localhost') }}"
ceilometer_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
ceilometer_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
ceilometer_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
ceilometer_oslomsg_notify_userid: "{{ ceilometer_oslomsg_rpc_userid }}"
ceilometer_oslomsg_notify_password: "{{ ceilometer_oslomsg_rpc_password }}"
ceilometer_oslomsg_notify_vhost: "{{ ceilometer_oslomsg_rpc_vhost }}"

# Cinder notifications
cinder_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
cinder_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
cinder_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
cinder_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
cinder_oslomsg_notify_userid: "{{ cinder_oslomsg_rpc_userid | default('cinder') }}"
cinder_oslomsg_notify_password: "{{ cinder_ceilometer_enabled | ternary(cinder_oslomsg_rpc_password, '') }}"
cinder_oslomsg_notify_vhost: "{{ cinder_oslomsg_rpc_vhost | default('/cinder') }}"

# Designate notifications
designate_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
designate_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
designate_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
designate_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
designate_oslomsg_notify_userid: "{{ designate_oslomsg_rpc_userid | default('designate-rpc') }}"
designate_oslomsg_notify_password: "{{ designate_ceilometer_enabled | ternary(designate_oslomsg_rpc_password, '') }}"
designate_oslomsg_notify_vhost: "{{ designate_oslomsg_rpc_vhost | default('/designate') }}"

# Glance notifications
glance_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
glance_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
glance_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
glance_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
glance_oslomsg_notify_userid: "{{ glance_oslomsg_rpc_userid | default('glance') }}"
glance_oslomsg_notify_password: "{{ glance_ceilometer_enabled | ternary(glance_oslomsg_rpc_password, '') }}"
glance_oslomsg_notify_vhost: "{{ glance_oslomsg_rpc_vhost | default('/glance') }}"

# Heat notifications
heat_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
heat_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
heat_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
heat_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
heat_oslomsg_notify_userid: "{{ heat_oslomsg_rpc_userid | default('heat') }}"
heat_oslomsg_notify_password: "{{ heat_ceilometer_enabled | ternary(heat_oslomsg_rpc_password, '') }}"
heat_oslomsg_notify_vhost: "{{ heat_oslomsg_rpc_vhost | default('/heat') }}"

# Keystone notifications
keystone_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
keystone_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
keystone_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
keystone_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
keystone_oslomsg_notify_userid: "{{ keystone_oslomsg_rpc_userid | default('keystone') }}"
keystone_oslomsg_notify_password: "{{ keystone_ceilometer_enabled | ternary(keystone_oslomsg_rpc_password, '') }}"
keystone_oslomsg_notify_vhost: "{{ keystone_oslomsg_rpc_vhost | default('/keystone') }}"

# Neutron notifications
neutron_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
neutron_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
neutron_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
neutron_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
neutron_oslomsg_notify_userid: "{{ neutron_oslomsg_rpc_userid | default('neutron') }}"
neutron_oslomsg_notify_password: "{{ neutron_ceilometer_enabled | ternary(neutron_oslomsg_rpc_password, '') }}"
neutron_oslomsg_notify_vhost: "{{ neutron_oslomsg_rpc_vhost | default('/neutron') }}"

# Nova notifications
nova_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
nova_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
nova_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
nova_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
nova_oslomsg_notify_userid: "{{ nova_oslomsg_rpc_userid | default('nova') }}"
nova_oslomsg_notify_password: "{{ nova_ceilometer_enabled | ternary(nova_oslomsg_rpc_password, '') }}"
nova_oslomsg_notify_vhost: "{{ nova_oslomsg_rpc_vhost | default('/nova') }}"

# Sahara notifications
sahara_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
sahara_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
sahara_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
sahara_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
sahara_oslomsg_notify_userid: "{{ sahara_oslomsg_rpc_userid | default('sahara') }}"
sahara_oslomsg_notify_password: "{{ sahara_ceilometer_enabled | ternary(sahara_oslomsg_rpc_password, '') }}"
sahara_oslomsg_notify_vhost: "{{ sahara_oslomsg_rpc_vhost | default('/sahara') }}"

# Swift notifications
swift_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
swift_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
swift_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
swift_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
swift_oslomsg_notify_userid: "swift"
swift_oslomsg_notify_vhost: "/swift"

# Trove notifications
trove_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
trove_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
trove_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
trove_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
trove_oslomsg_notify_userid: "{{ trove_oslomsg_rpc_userid | default('trove') }}"
trove_oslomsg_notify_password: "{{ trove_ceilometer_enabled | ternary(trove_oslomsg_rpc_password, '') }}"
trove_oslomsg_notify_vhost: "{{ trove_oslomsg_rpc_vhost | default('/trove') }}"

## (Qdrouterd) info
# TODO(ansmith): Change structure when more backends will be supported
ceilometer_oslomsg_amqp1_enabled: "{{ ceilometer_oslomsg_rpc_transport == 'amqp' }}"

#Ceilometer services info
ceilometer_role_name: admin

## Service Type and Data
ceilometer_service_region: RegionOne
ceilometer_service_user_name: ceilometer
ceilometer_service_project_name: service
ceilometer_service_project_domain_id: default
ceilometer_service_user_domain_id: default
ceilometer_service_interface: internalURL

ceilometer_service_in_ldap: false

## Ceilometer config
# Cap the maximum number of threads / workers when a user value is unspecified
ceilometer_notification_workers_max: 16
ceilometer_notification_workers: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, ceilometer_notification_workers_max] | min }}"

# Enable/Disable Ceilometer per service
cinder_ceilometer_enabled: "{{ (groups['cinder_all'] is defined) and (groups['cinder_all'] | length > 0) }}"
designate_ceilometer_enabled: "{{ (groups['designate_all'] is defined) and (groups['designate_all'] | length > 0) }}"
glance_ceilometer_enabled: "{{ (groups['glance_all'] is defined) and (groups['glance_all'] | length > 0) }}"
heat_ceilometer_enabled: "{{ (groups['heat_all'] is defined) and (groups['heat_all'] | length > 0) }}"
keystone_ceilometer_enabled: "{{ (groups['keystone_all'] is defined) and (groups['keystone_all'] | length > 0) }}"
neutron_ceilometer_enabled: "{{ (groups['neutron_all'] is defined) and (groups['neutron_all'] | length > 0) }}"
nova_ceilometer_enabled: "{{ (groups['nova_all'] is defined) and (groups['nova_all'] | length > 0) }}"
sahara_ceilometer_enabled: "{{ (groups['sahara_all'] is defined) and (groups['sahara_all'] | length > 0) }}"
swift_ceilometer_enabled: "{{ (groups['swift_all'] is defined) and (groups['swift_all'] | length > 0) }}"
trove_ceilometer_enabled: "{{ (groups['trove_all'] is defined) and (groups['trove_all'] | length > 0) }}"

# Enable/Disable Telemetry partner services in Ceilometer
# Defaults to True if the service is deployed.
ceilometer_aodh_enabled: false
ceilometer_gnocchi_enabled: false

# TODO (andymccr): Remove in Queen release (along with config template overrides)
# Sampling interval for ceilometer-polling services
ceilometer_sample_interval: 600
ceilometer_meter_sample_interval: "{{ ceilometer_sample_interval }}"
ceilometer_cpu_source_sample_interval: "{{ ceilometer_sample_interval }}"
ceilometer_disk_source_sample_interval: "{{ ceilometer_sample_interval }}"
ceilometer_network_source_sample_interval: "{{ ceilometer_sample_interval }}"

## Keystone authentication middleware
ceilometer_keystone_auth_plugin: "{{ ceilometer_keystone_auth_type }}"
ceilometer_keystone_auth_type: password

# Common pip packages
ceilometer_pip_packages:
  - ceilometer
  - ceilometermiddleware
  - cryptography
  - gnocchiclient
  - osprofiler
  - PyMySQL
  - pymongo
  - python-ceilometerclient
  - python-memcached
  - systemd-python
  - tooz[zake]
  - warlock
  - kazoo
  - redis

ceilometer_optional_oslomsg_amqp1_pip_packages:
  - oslo.messaging[amqp1]

ceilometer_agent_init_overrides: {}
ceilometer_polling_init_overrides: {}

## Service Name-Group Mapping
ceilometer_services:
  ceilometer-agent-notification:
    group:
      - ceilometer_agent_notification
    config_overrides: "{{ ceilometer_agent_init_overrides }}"
    service_name: ceilometer-agent-notification
    execstarts: "{{ ceilometer_bin }}/ceilometer-agent-notification"
  ceilometer-polling:
    group:
      - ceilometer_agent_central
      - ceilometer_agent_compute
    config_overrides: "{{ ceilometer_polling_init_overrides }}"
    service_name: ceilometer-polling
    execstarts: "{{ ceilometer_bin }}/ceilometer-polling"

ceilometer_required_secrets:
  - memcached_encryption_key
  - ceilometer_telemetry_secret
  - ceilometer_oslomsg_rpc_password
  - ceilometer_oslomsg_notify_password
  - ceilometer_service_password

# This variable is used by the repo_build process to determine
# which host group to check for members of before building the
# pip packages required by this role. The value is picked up
# by the py_pkgs lookup.
ceilometer_role_project_group: ceilometer_all

#: Tunable file-based overrides
# The contents of these files, if they exist, are read from the
# specified path on the deployment host, interpreted by the
# template engine and copied to the target host. If they do
# not exist then the default files will be sourced from the
# service git repository.
ceilometer_data_meters_default_file_path: "/etc/openstack_deploy/ceilometer/meters.yaml"
ceilometer_event_definitions_default_file_path: "/etc/openstack_deploy/ceilometer/event_definitions.yaml"
ceilometer_gnocchi_resources_default_file_path: "/etc/openstack_deploy/ceilometer/gnocchi_resources.yaml"
ceilometer_loadbalancer_v2_meter_definitions_default_file_path: "/etc/openstack_deploy/ceilometer/loadbalancer_v2_meter_definitions.yaml"
ceilometer_osprofiler_event_definitions_default_file_path: "/etc/openstack_deploy/ceilometer/osprofiler_event_definitions.yaml"
ceilometer_polling_default_file_path: "/etc/openstack_deploy/ceilometer/polling.yaml"

## Tunable var-based overrides
# The contents of these are templated over the default files.
ceilometer_ceilometer_conf_overrides: {}
ceilometer_data_meters_yaml_overrides: {}
ceilometer_event_definitions_yaml_overrides: {}
ceilometer_gnocchi_resources_yaml_overrides: {}
ceilometer_loadbalancer_v2_meter_definitions_yaml_overrides: {}
ceilometer_osprofiler_event_definitions_yaml_overrides: {}
ceilometer_pipeline_yaml_overrides: {}
ceilometer_polling_yaml_overrides: {}
ceilometer_rootwrap_conf_overrides: {}