diff --git a/docker/services/haproxy.yaml b/docker/services/haproxy.yaml index 04b6d3793d..a7f7293536 100644 --- a/docker/services/haproxy.yaml +++ b/docker/services/haproxy.yaml @@ -279,6 +279,8 @@ outputs: - name: Stop and disable haproxy service when: haproxy_enabled|bool service: name=haproxy state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of HAproxy package set_fact: remove_haproxy_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/ironic-api.yaml b/docker/services/ironic-api.yaml index c12d5c439c..f06947d8e7 100644 --- a/docker/services/ironic-api.yaml +++ b/docker/services/ironic-api.yaml @@ -203,6 +203,8 @@ outputs: - ironic_httpd_enabled|bool - httpd_running|bool service: name=httpd state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of openstack-ironic-api package set_fact: remove_ironic_api_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/ironic-conductor.yaml b/docker/services/ironic-conductor.yaml index a24fc6eb30..5d0c86ddb1 100644 --- a/docker/services/ironic-conductor.yaml +++ b/docker/services/ironic-conductor.yaml @@ -236,6 +236,8 @@ outputs: - name: Stop and disable ironic_conductor service when: ironic_conductor_enabled|bool service: name=openstack-ironic-conductor state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of openstack-ironic-conductor package set_fact: remove_ironic_conductor_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/keepalived.yaml b/docker/services/keepalived.yaml index 9ba404db15..4314d0d5dc 100644 --- a/docker/services/keepalived.yaml +++ b/docker/services/keepalived.yaml @@ -36,6 +36,10 @@ parameters: default: {} description: Parameters specific to the role type: json + UpgradeRemoveUnusedPackages: + default: false + description: Remove package if the service is being disabled during upgrade + type: boolean resources: @@ -133,3 +137,12 @@ outputs: - name: Stop and disable keepalived service service: name=keepalived state=stopped enabled=no when: keepalived_enabled|bool + - when: step|int == 3 + block: + - name: Set fact for removal of Keepalived package + set_fact: + remove_keepalived_package: {get_param: UpgradeRemoveUnusedPackages} + - name: Remove Keepalived package if operator requests it + package: name=keepalived state=removed + ignore_errors: True + when: remove_keepalived_package|bool diff --git a/docker/services/keystone.yaml b/docker/services/keystone.yaml index cb753be87a..3752589411 100644 --- a/docker/services/keystone.yaml +++ b/docker/services/keystone.yaml @@ -259,6 +259,8 @@ outputs: file: path: /var/spool/cron/keystone state: absent + - when: step|int == 3 + block: - name: Set fact for removal of openstack-keystone package set_fact: remove_keystone_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/mistral-api.yaml b/docker/services/mistral-api.yaml index 1d6e3ce440..e999ab763d 100644 --- a/docker/services/mistral-api.yaml +++ b/docker/services/mistral-api.yaml @@ -211,6 +211,8 @@ outputs: when: - mistral_httpd_enabled|bool - httpd_running|bool + - when: step|int == 3 + block: - name: Set fact for removal of openstack-mistral-api package set_fact: remove_mistral_api_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/mistral-engine.yaml b/docker/services/mistral-engine.yaml index ad43d16367..c8639231df 100644 --- a/docker/services/mistral-engine.yaml +++ b/docker/services/mistral-engine.yaml @@ -146,6 +146,8 @@ outputs: - name: Stop and disable mistral_engine service when: mistral_engine_enabled|bool service: name=openstack-mistral-engine state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of openstack-mistral-engine package set_fact: remove_mistral_engine_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/mistral-event-engine.yaml b/docker/services/mistral-event-engine.yaml index 0c3e90e1b6..98a88f9500 100644 --- a/docker/services/mistral-event-engine.yaml +++ b/docker/services/mistral-event-engine.yaml @@ -146,6 +146,8 @@ outputs: - name: Stop and disable mistral_event_engine service when: mistral_event_engine_enabled|bool service: name=openstack-mistral-event-engine state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of openstack-mistral-event-engine package set_fact: remove_mistral_event_engine_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/mistral-executor.yaml b/docker/services/mistral-executor.yaml index 0bb81f35f9..85a31d9edb 100644 --- a/docker/services/mistral-executor.yaml +++ b/docker/services/mistral-executor.yaml @@ -162,6 +162,8 @@ outputs: - name: Stop and disable mistral_executor service when: mistral_executor_enabled|bool service: name=openstack-mistral-executor state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of openstack-mistral-executor package set_fact: remove_mistral_executor_package: {get_param: UpgradeRemoveUnusedPackages} diff --git a/docker/services/zaqar.yaml b/docker/services/zaqar.yaml index 94247339db..993dba55ce 100644 --- a/docker/services/zaqar.yaml +++ b/docker/services/zaqar.yaml @@ -229,6 +229,8 @@ outputs: - zaqar_httpd_enabled|bool - httpd_running|bool service: name=httpd state=stopped enabled=no + - when: step|int == 3 + block: - name: Set fact for removal of openstack-zaqar package set_fact: remove_zaqar_package: {get_param: UpgradeRemoveUnusedPackages}