From 74f751c76232861711f0ffd5a2e070ad0690b67a Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Wed, 7 Mar 2018 12:36:14 -0500 Subject: [PATCH] FFU: Introduce collectd fast-forward-upgrade tasks bp fast-forward-upgrades Change-Id: Idfe3f05441030da9078993070307f420b01256b0 --- docker/services/collectd.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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