diff --git a/docker/services/database/mongodb.yaml b/docker/services/database/mongodb.yaml index b882e7b348..2ef6d865b3 100644 --- a/docker/services/database/mongodb.yaml +++ b/docker/services/database/mongodb.yaml @@ -181,3 +181,24 @@ outputs: - step|int == 2 - mongod_enabled.rc == 0 service: name=mongod state=stopped enabled=no + fast_forward_upgrade_tasks: + - name: Check for mongodb service + command: systemctl is-enabled --quiet mongod + tags: common + ignore_errors: True + register: mongod_enabled_result + when: + - step|int == 0 + - release == 'ocata' + - name: Set fact mongod_enabled + set_fact: + mongod_enabled: "{{ mongod_enabled_result.rc == 0 }}" + when: + - step|int == 0 + - release == 'ocata' + - name: Stop and disable mongodb service + when: + - step|int == 1 + - release == 'ocata' + - mongod_enabled|bool + service: name=mongod state=stopped enabled=no