From 0381444f2cea852dc9c1038a8f6adf680e2e8221 Mon Sep 17 00:00:00 2001 From: Masco Date: Mon, 23 Sep 2024 15:35:37 +0530 Subject: [PATCH] fix metrics start stop and cron job PATH Change-Id: I19cbc50c40dd37f177974e70051fc43745c720a0 --- ansible/install/start-collectd.yml | 22 +++++++++----------- ansible/install/stop-collectd.yml | 22 +++++++++----------- ansible/install/toggle-indexing-cron-job.yml | 2 +- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/ansible/install/start-collectd.yml b/ansible/install/start-collectd.yml index 2913f700a..0acc065f2 100644 --- a/ansible/install/start-collectd.yml +++ b/ansible/install/start-collectd.yml @@ -1,18 +1,16 @@ --- -- name: start collectd for osp <= 17 - block: - - name: set fact collectd_container - import_playbook: pre-collectd.yml - - - name: Start containerized collectd (Stein and greater recommended) - import_playbook: start-collectd-container.yml - when: hostvars['undercloud']['collectd_container'] - - - name: Start collectd installed through RPMs - import_playbook: start-collectd-baremetal.yml - when: not hostvars['undercloud']['collectd_container'] +- name: set fact collectd_container + import_playbook: pre-collectd.yml when: not is_rhoso_deployment +- name: Start containerized collectd (Stein and greater recommended) + import_playbook: start-collectd-container.yml + when: hostvars['undercloud']['collectd_container'] and not is_rhoso_deployment + +- name: Start collectd installed through RPMs + import_playbook: start-collectd-baremetal.yml + when: not hostvars['undercloud']['collectd_container'] and not is_rhoso_deployment + - name: Start collectd on RHOSO OCP workers import_playbook: start-collectd-rhoso.yml when: is_rhoso_deployment diff --git a/ansible/install/stop-collectd.yml b/ansible/install/stop-collectd.yml index 9ab09ef69..c82538a8e 100644 --- a/ansible/install/stop-collectd.yml +++ b/ansible/install/stop-collectd.yml @@ -1,18 +1,16 @@ --- -- name: stop collectd on osp <= 17 - block: - - name: set fact collectd_container - import_playbook: pre-collectd.yml - - - name: Run containerized collectd (Stein and greater recommended) - import_playbook: stop-collectd-container.yml - when: hostvars['undercloud']['collectd_container'] - - - name: Run collectd installed through RPMs - import_playbook: stop-collectd-baremetal.yml - when: not hostvars['undercloud']['collectd_container'] +- name: set fact collectd_container + import_playbook: pre-collectd.yml when: not is_rhoso_deployment +- name: Run containerized collectd (Stein and greater recommended) + import_playbook: stop-collectd-container.yml + when: hostvars['undercloud']['collectd_container'] and not is_rhoso_deployment + +- name: Run collectd installed through RPMs + import_playbook: stop-collectd-baremetal.yml + when: not hostvars['undercloud']['collectd_container'] and not is_rhoso_deployment + - name: stop collectd on RHOSO ocp workers import_playbook: stop-collectd-rhoso.yml when: is_rhoso_deployment diff --git a/ansible/install/toggle-indexing-cron-job.yml b/ansible/install/toggle-indexing-cron-job.yml index 1024ca8ce..1b5eac4b9 100644 --- a/ansible/install/toggle-indexing-cron-job.yml +++ b/ansible/install/toggle-indexing-cron-job.yml @@ -31,5 +31,5 @@ cron: name: "Index ocp data for the given time" minute: "*/{{ kubeburner_index_interval | int }}" - job: "PATH=/usr/local/bin:/usr/bin:/bin && /usr/bin/ansible-playbook {{ browbeat_path }}/ansible/install/index-ocp-data.yml > /tmp/ocp_index_cron.log 2>&1" + job: "PATH={{ ansible_env.PATH }} && ansible-playbook {{ browbeat_path }}/ansible/install/index-ocp-data.yml > /tmp/ocp_index_cron.log 2>&1" state: "{{ cron_state }}"