diff --git a/docker/services/collectd.yaml b/docker/services/collectd.yaml index cd34b7fd55..f7595a9a0e 100644 --- a/docker/services/collectd.yaml +++ b/docker/services/collectd.yaml @@ -147,3 +147,23 @@ outputs: when: - step|int == 2 - remove_collectd_package|bool + fast_forward_upgrade_tasks: + - name: Check if collectd.service is deployed + command: systemctl is-enabled --quiet collectd.service + ignore_errors: True + register: collectd_enabled_result + when: + - step|int == 0 + - release == 'ocata' + - name: Set fact collectd_enabled + set_fact: + collectd_enabled: "{{ collectd_enabled_result.rc == 0 }}" + when: + - step|int == 0 + - release == 'ocata' + - name: Stop collectd service + service: name=collectd.service state=stopped enabled=no + when: + - step|int == 1 + - release == 'ocata' + - collectd_enabled|bool