diff options
Diffstat (limited to 'puppet/services/metrics/collectd.yaml')
-rw-r--r-- | puppet/services/metrics/collectd.yaml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/puppet/services/metrics/collectd.yaml b/puppet/services/metrics/collectd.yaml index e4e7dac7..49b2d4c2 100644 --- a/puppet/services/metrics/collectd.yaml +++ b/puppet/services/metrics/collectd.yaml @@ -109,3 +109,23 @@ outputs: .flatten().distinct() step_config: | include ::tripleo::profile::base::metrics::collectd + upgrade_tasks: + - name: Check if collectd is deployed + command: systemctl is-enabled collectd + tags: common + ignore_errors: True + register: collectd_enabled + - name: Check status of collectd service + shell: > + /usr/bin/systemctl show collectd --property ActiveState | + grep '\bactive\b' + when: collectd_enabled.rc == 0 + tags: step0,validation + - name: Stop collectd service + tags: step1 + when: collectd_enabled.rc == 0 + service: name=collectd state=stopped + - name: Install collectd package if it was disabled + tags: step3 + yum: name=collectd state=latest + when: collectd_enabled.rc != 0 |