diff options
author | marios <marios@redhat.com> | 2017-07-03 19:20:30 +0300 |
---|---|---|
committer | Emilien Macchi <emilien@redhat.com> | 2017-10-09 11:06:26 -0700 |
commit | 6d150b03cff457bf43e8c2b55ba03ace20d6c244 (patch) | |
tree | 8489116731b0f053970c02af600e8f796152c2a9 /docker/services/barbican-api.yaml | |
parent | c4bd0a3468af429abfbbcea634ee1023f95778c9 (diff) |
Remove package if service stopped and disabled
Adds a UpgradeRemoveUnusedPackages param to use
in the ansible when conditional for the removal
Adds package removal to step2 right after a service
is stopped and disabled on step2. Package updates
happen in step3 so ideally remove before that.
The package removal task has ignore_errors true
so dependencies or other issue removing packages will
not fail the upgrade workflow.
Also adds this to the upgrade environment files
for visibility and defaulting false
Change-Id: Ie4e4a2d41f7752c5a13507a7c15c6f68e203cfca
Related-Bug: 1701501
(cherry picked from commit ce0ef2fa207698c1ae61c1620fe3c5e8d1c7bfca)
Diffstat (limited to 'docker/services/barbican-api.yaml')
-rw-r--r-- | docker/services/barbican-api.yaml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docker/services/barbican-api.yaml b/docker/services/barbican-api.yaml index 1aa000b6..af528f79 100644 --- a/docker/services/barbican-api.yaml +++ b/docker/services/barbican-api.yaml @@ -39,6 +39,10 @@ parameters: EnableInternalTLS: type: boolean default: false + UpgradeRemoveUnusedPackages: + default: false + description: Remove package if the service is being disabled during upgrade + type: boolean conditions: @@ -152,5 +156,10 @@ outputs: - name: Stop and disable barbican_api service tags: step2 service: name=openstack-barbican-api state=stopped enabled=no + - name: Remove openstack-barbican-api package if operator requests it + yum: name=openstack-barbican-api state=removed + tags: step2 + ignore_errors: True + when: {get_param: UpgradeRemoveUnusedPackages} metadata_settings: get_attr: [BarbicanApiBase, role_data, metadata_settings] |