Merge "Add panko.conf file in ceilometer container"

This commit is contained in:
Jenkins 2017-04-19 15:08:53 +00:00 committed by Gerrit Code Review
commit 8297596c81
5 changed files with 43 additions and 0 deletions

View File

@ -31,6 +31,7 @@
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ceilometer_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_json: "{{ ceilometer_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_notification_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" ceilometer_notification_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
panko_conf: "{{ panko_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_docker: kolla_docker:
action: "recreate_or_restart_container" action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
@ -46,6 +47,7 @@
or policy_json.changed | bool or policy_json.changed | bool
or ceilometer_events.changed | bool or ceilometer_events.changed | bool
or ceilometer_notification_container.changed | bool or ceilometer_notification_container.changed | bool
or panko_conf.changed | bool
- name: Restart ceilometer-central container - name: Restart ceilometer-central container
vars: vars:
@ -78,6 +80,7 @@
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}" ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
policy_json: "{{ ceilometer_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}" policy_json: "{{ ceilometer_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
ceilometer_collector_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}" ceilometer_collector_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
panko_conf: "{{ panko_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
kolla_docker: kolla_docker:
action: "recreate_or_restart_container" action: "recreate_or_restart_container"
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
@ -92,6 +95,7 @@
or ceilometer_conf.changed | bool or ceilometer_conf.changed | bool
or policy_json.changed | bool or policy_json.changed | bool
or ceilometer_collector_container.changed | bool or ceilometer_collector_container.changed | bool
or panko_conf.changed | bool
- name: Restart ceilometer-compute container - name: Restart ceilometer-compute container
vars: vars:

View File

@ -84,6 +84,29 @@
notify: notify:
- Restart ceilometer-notification container - Restart ceilometer-notification container
- name: Copying over panko.conf
vars:
service_require_panko_conf:
- ceilometer-notification
- ceilometer-collector
merge_configs:
sources:
- ../panko/templates/panko.conf.j2
- "{{ node_custom_config }}/global.conf"
- "{{ node_custom_config }}/panko.conf"
- "{{ node_custom_config }}/panko/panko.conf"
- "{{ node_custom_config }}/panko/{{ inventory_hostname }}/panko.conf"
dest: "{{ node_config_directory }}/panko/panko.conf"
register: panko_confs
when:
- ceilometer_event_type == 'panko'
- item.value.enabled | bool
- inventory_hostname in groups[item.value.group]
- item.key in service_require_panko_conf
with_dict: "{{ ceilometer_services }}"
notify:
- "Restart {{ item.key }} container"
- name: Check if policies shall be overwritten - name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/ceilometer/policy.json" local_action: stat path="{{ node_custom_config }}/ceilometer/policy.json"
register: ceilometer_policy register: ceilometer_policy

View File

@ -13,6 +13,13 @@
"owner": "ceilometer", "owner": "ceilometer",
"perm": "0600", "perm": "0600",
"optional": true "optional": true
},
{
"source": "{{ container_config_directory }}/panko.conf",
"dest": "/etc/panko/panko.conf",
"owner": "ceilometer",
"perm": "0600",
"optional": true
} }
], ],
"permissions": [ "permissions": [

View File

@ -31,6 +31,13 @@
"owner": "ceilometer", "owner": "ceilometer",
"perm": "0600", "perm": "0600",
"optional": true "optional": true
},
{
"source": "{{ container_config_directory }}/panko.conf",
"dest": "/etc/panko/panko.conf",
"owner": "ceilometer",
"perm": "0600",
"optional": true
} }
], ],
"permissions": [ "permissions": [

View File

@ -436,6 +436,8 @@
- name: Apply role ceilometer - name: Apply role ceilometer
gather_facts: false gather_facts: false
vars_files:
- "roles/panko/defaults/main.yml"
hosts: hosts:
- ceilometer - ceilometer
- compute - compute