X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=puppet%2Fservices%2Fmonitoring%2Fsensu-client.yaml;h=aba2b1ed7a0c56f17a4bd9ddc363095b5a3b0af8;hb=a1b3e2ee756b2957118c65cab83814461cce1b07;hp=c082654949fd13e3a569902933c187b90f10494f;hpb=ea238df9de74d4a0a03521635d75491a5e95448d;p=apex-tripleo-heat-templates.git diff --git a/puppet/services/monitoring/sensu-client.yaml b/puppet/services/monitoring/sensu-client.yaml index c0826549..aba2b1ed 100644 --- a/puppet/services/monitoring/sensu-client.yaml +++ b/puppet/services/monitoring/sensu-client.yaml @@ -63,11 +63,22 @@ outputs: step_config: | include ::tripleo::profile::base::monitoring::sensu upgrade_tasks: + - name: Check if sensu_client is deployed + command: systemctl is-enabled sensu-client + tags: common + ignore_errors: True + register: sensu_client_enabled - name: Check status of sensu-client service shell: > /usr/bin/systemctl show sensu-client --property ActiveState | grep '\bactive\b' + when: sensu_client_enabled.rc == 0 tags: step0,validation - name: Stop sensu-client service tags: step1 + when: sensu_client_enabled.rc == 0 service: name=sensu-client state=stopped + - name: Install sensu package if it was disabled + tags: step3 + yum: name=sensu state=latest + when: sensu_client.rc != 0