Merge "Add support for Ceilometer custom gnocchi_resources.yaml"
This commit is contained in:
commit
22a6e0216e
@ -6,6 +6,7 @@
|
||||
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
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 }}"
|
||||
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 }}"
|
||||
@ -24,7 +25,9 @@
|
||||
- service.enabled | bool
|
||||
- config_json.changed | bool
|
||||
or ceilometer_conf.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or ceilometer_events.changed | bool
|
||||
or ceilometer_pipeline.changed | bool
|
||||
or ceilometer_notification_container.changed | bool
|
||||
@ -37,6 +40,7 @@
|
||||
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
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 }}"
|
||||
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 }}"
|
||||
@ -55,7 +59,9 @@
|
||||
- config_json.changed | bool
|
||||
or ceilometer_conf.changed | bool
|
||||
or ceilometer_pipeline.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or ceilometer_central_container.changed | bool
|
||||
|
||||
- name: Restart ceilometer-compute container
|
||||
@ -65,6 +71,7 @@
|
||||
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
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 }}"
|
||||
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 }}"
|
||||
@ -84,7 +91,9 @@
|
||||
- config_json.changed | bool
|
||||
or ceilometer_conf.changed | bool
|
||||
or ceilometer_pipeline.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or vcenter_ca_file.changed | bool
|
||||
or ceilometer_compute_container.changed | bool
|
||||
|
||||
@ -95,7 +104,9 @@
|
||||
config_json: "{{ ceilometer_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
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 }}"
|
||||
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_ipmi_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
kolla_docker:
|
||||
action: "recreate_or_restart_container"
|
||||
@ -111,5 +122,7 @@
|
||||
- config_json.changed | bool
|
||||
or ceilometer_conf.changed | bool
|
||||
or ceilometer_pipeline.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or ceilometer_ipmi_container.changed | bool
|
||||
|
@ -38,6 +38,32 @@
|
||||
when:
|
||||
- ceilometer_polling_file.stat.exists
|
||||
|
||||
- name: Check custom gnocchi_resources.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/gnocchi_resources.yaml"
|
||||
register: ceilometer_gnocchi_resources_file
|
||||
|
||||
- name: Copying over gnocchi_resources.yaml
|
||||
copy:
|
||||
src: "{{ node_custom_config }}/ceilometer/gnocchi_resources.yaml"
|
||||
dest: "{{ node_config_directory }}/{{ item.key }}/gnocchi_resources.yaml"
|
||||
force: True
|
||||
mode: "0660"
|
||||
become: true
|
||||
register: ceilometer_gnocchi_resources_overwriting
|
||||
when:
|
||||
- ceilometer_gnocchi_resources_file.stat.exists
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
with_dict: "{{ ceilometer_services }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
|
||||
- name: Set ceilometer gnocchi_resources file's path
|
||||
set_fact:
|
||||
ceilometer_gnocchi_resources_file_path: "{{ ceilometer_gnocchi_resources_file.stat.path }}"
|
||||
when:
|
||||
- ceilometer_gnocchi_resources_file.stat.exists
|
||||
|
||||
- name: Check if policies shall be overwritten
|
||||
local_action: stat path="{{ item }}"
|
||||
run_once: True
|
||||
|
@ -12,6 +12,12 @@
|
||||
"dest": "/etc/ceilometer/polling.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_gnocchi_resources_file_path is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/gnocchi_resources.yaml",
|
||||
"dest": "/etc/ceilometer/gnocchi_resources.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_policy_file is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/{{ ceilometer_policy_file }}",
|
||||
|
@ -12,6 +12,12 @@
|
||||
"dest": "/etc/ceilometer/polling.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_gnocchi_resources_file_path is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/gnocchi_resources.yaml",
|
||||
"dest": "/etc/ceilometer/gnocchi_resources.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_policy_file is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/{{ ceilometer_policy_file }}",
|
||||
|
@ -12,6 +12,12 @@
|
||||
"dest": "/etc/ceilometer/polling.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_gnocchi_resources_file_path is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/gnocchi_resources.yaml",
|
||||
"dest": "/etc/ceilometer/gnocchi_resources.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_policy_file is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/{{ ceilometer_policy_file }}",
|
||||
|
@ -30,6 +30,12 @@
|
||||
"dest": "/etc/ceilometer/polling.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_gnocchi_resources_file_path is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/gnocchi_resources.yaml",
|
||||
"dest": "/etc/ceilometer/gnocchi_resources.yaml",
|
||||
"owner": "ceilometer",
|
||||
"perm": "0600"
|
||||
}{% endif %}{% if ceilometer_policy_file is defined %},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/{{ ceilometer_policy_file }}",
|
||||
|
Loading…
Reference in New Issue
Block a user