Merge "Add support for ceilometer custom pipeline.yaml"

This commit is contained in:
Zuul 2019-06-03 19:35:55 +00:00 committed by Gerrit Code Review
commit 0f6cd86f3a
2 changed files with 33 additions and 0 deletions

View File

@ -7,6 +7,7 @@
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_notification_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
@ -28,6 +29,7 @@
or ceilometer_event_definitions_overwriting.changed | bool
or ceilometer_event_pipeline_overwriting.changed | bool
or gnocchi_resources_overwriting.changed | bool
or pipeline_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or ceilometer_event_definitions.changed | bool
@ -44,6 +46,7 @@
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_central_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
@ -63,6 +66,7 @@
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or gnocchi_resources_overwriting.changed | bool
or pipeline_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or ceilometer_central_container.changed | bool
@ -75,6 +79,7 @@
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_compute_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
@ -95,6 +100,7 @@
or ceilometer_conf.changed | bool
or ceilometer_pipeline.changed | bool
or gnocchi_resources_overwriting.changed | bool
or pipeline_overwriting.changed | bool
or policy_overwriting.changed | bool
or polling_overwriting.changed | bool
or vcenter_ca_file.changed | bool

View File

@ -196,6 +196,32 @@
notify:
- Restart ceilometer-notification container
- name: Check custom pipeline.yaml exists
local_action: stat path="{{ node_custom_config }}/ceilometer/pipeline.yaml"
register: ceilometer_pipeline_file
- name: Copying over pipeline.yaml
vars:
services_require_pipeline:
- ceilometer-compute
- ceilometer-central
- ceilometer-notification
copy:
src: "{{ node_custom_config }}/ceilometer/pipeline.yaml"
dest: "{{ node_config_directory }}/{{ item.key }}/pipeline.yaml"
force: True
mode: "0660"
become: true
register: ceilometer_pipeline_overwriting
when:
- ceilometer_pipeline_file.stat.exists
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- item.key in services_require_pipeline
with_dict: "{{ ceilometer_services }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over pipeline.yaml file
vars:
services_require_pipeline:
@ -212,6 +238,7 @@
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
- item.key in services_require_pipeline
- not ceilometer_pipeline_file.stat.exists
with_dict: "{{ ceilometer_services }}"
notify:
- "Restart {{ item.key }} container"