From c1e4e298f0142753463493cfba913d83edf7db7b Mon Sep 17 00:00:00 2001 From: Asma Syed Hameed Date: Thu, 3 Mar 2022 15:11:39 +0530 Subject: [PATCH] Pin sqlalchemy collectd plugin for OSP < 16.2 Change-Id: Ia083b205b2361c403f57a02057de1f9fc697a366 --- ansible/install/roles/collectd/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/install/roles/collectd/tasks/main.yml b/ansible/install/roles/collectd/tasks/main.yml index 66f6d4bdc..5f9088516 100644 --- a/ansible/install/roles/collectd/tasks/main.yml +++ b/ansible/install/roles/collectd/tasks/main.yml @@ -65,7 +65,7 @@ become: true register: db_connections with_dict: "{{mysql_svcs}}" - when: ('Controller' in group_names and sqlalchemy_collectd_plugin) + when: (rhosp_version is version('16.2', '<') and 'Controller' in group_names and sqlalchemy_collectd_plugin) ignore_errors: true - name: Append to mysql string @@ -75,7 +75,7 @@ section: database option: connection value: "{{ item.stdout }}&plugin=collectd&collectd_program_name={{ item.item.key }}" - when: (('Controller' in group_names) and sqlalchemy_collectd_plugin and ('plugin=collectd' not in item.stdout)) + when: (rhosp_version is version('16.2', '<') and ('Controller' in group_names) and sqlalchemy_collectd_plugin and ('plugin=collectd' not in item.stdout)) with_items: "{{ db_connections.results }}" become: true @@ -100,7 +100,7 @@ - heat_api_cron - heat_api_cfn ignore_errors: yes - when: ('Controller' in group_names and sqlalchemy_collectd_plugin) + when: (rhosp_version is version('16.2', '<') and 'Controller' in group_names and sqlalchemy_collectd_plugin) # CephStorage OSD monitoring