Browse Source

Adds ceilometer-upgrade task

Run ceilometer-upgrade task  post ceilometer installation
to create the resources in gnocchi

Implements: Additonal step to run ceilometer-upgrade during ceilometer-post-install tasks
Closes-Bug: 1737096
Closes-Bug: 1778195
(cherry picked from commit ca7cf70eafeb3be784aac9fb8ac21166fd4dbcd2)
(cherry picked from commit 9d54c79b82a3ce325b0070ffc78f4091c5e33e83)

Change-Id: I605f5527d8ae68e6a6eabbcfdd7fe0c60abd4332
changes/91/580391/2
bhujay 2 years ago
parent
commit
8885bca248
2 changed files with 18 additions and 0 deletions
  1. +13
    -0
      tasks/ceilometer_db_setup.yml
  2. +5
    -0
      tasks/main.yml

+ 13
- 0
tasks/ceilometer_db_setup.yml View File

@@ -0,0 +1,13 @@
---

- name: check for gnocchi resource file
stat:
path: "/etc/ceilometer/gnocchi_resources.yaml"
register: gnocchi_resource_file

- name: Initialize Gnocchi database by creating ceilometer resources
command: "{{ ceilometer_bin }}/ceilometer-upgrade --skip-metering-database"
become: yes
become_user: "{{ ceilometer_system_user_name }}"
changed_when: false
when: gnocchi_resource_file.stat.exists

+ 5
- 0
tasks/main.yml View File

@@ -53,3 +53,8 @@
- groups['ceilometer_central_container'] is defined and inventory_hostname == groups['ceilometer_central_container'][0]
tags:
- ceilometer-config

- include: ceilometer_db_setup.yml
tags:
- ceilometer-config
run_once: true

Loading…
Cancel
Save