Switch from 'podman rm' to tripleo-container-rm role

Rather than use the shell module directly, we switch to using the
role so that we do things consistently.

Change-Id: I0fc349d0697b2c34bb1daac4a6a961300cff49fa
(cherry picked from commit 55d4002300)
This commit is contained in:
Jesse Pretorius (odyssey4me) 2020-01-14 13:41:37 +00:00
parent e1bded6c5e
commit 97c2d4b99a
10 changed files with 70 additions and 50 deletions

View File

@ -370,11 +370,13 @@ outputs:
cinder_backup_node_names_upgraded is not defined or
cinder_backup_node_names_upgraded | length == 0
- name: remove cinder_backup init container on upgrade-scaleup to force re-init
shell: |
if podman inspect cinder_backup_init_bundle &> /dev/null; then
podman rm cinder_backup_init_bundle
fi
when: cinder_backup_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- cinder_backup_init_bundle
when:
- cinder_backup_short_node_names_upgraded | length > 1
- name: add the cinder_backup short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -356,11 +356,13 @@ outputs:
cinder_volume_node_names_upgraded is not defined or
cinder_volume_node_names_upgraded | length == 0
- name: remove cinder_volume init container on upgrade-scaleup to force re-init
shell: |
if podman inspect cinder_volume_init_bundle &> /dev/null; then
podman rm cinder_volume_init_bundle
fi
when: cinder_volume_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- cinder_volume_init_bundle
when:
- cinder_volume_short_node_names_upgraded | length > 1
- name: add the cinder_volume short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -517,11 +517,13 @@ outputs:
mysql_node_names_upgraded | length == 0
- name: remove mysql init container on upgrade-scaleup to force re-init
shell: |
if podman inspect mysql_init_bundle &> /dev/null; then
podman rm mysql_init_bundle
fi
when: mysql_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- mysql_init_bundle
when:
- mysql_short_node_names_upgraded | length > 1
- name: add the mysql short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -449,11 +449,13 @@ outputs:
redis_short_node_names_upgraded | length == 0
- name: remove redis init container on upgrade-scaleup to force re-init
shell: |
if podman inspect redis_init_bundle &> /dev/null; then
podman rm redis_init_bundle
fi
when: redis_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- redis_init_bundle
when:
- redis_short_node_names_upgraded | length > 1
- name: add the redis short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -568,11 +568,13 @@ outputs:
haproxy_short_node_names_upgraded | length == 0
- name: remove haproxy init container on upgrade-scaleup to force re-init
shell: |
if podman inspect haproxy_init_bundle &> /dev/null; then
podman rm haproxy_init_bundle
fi
when: haproxy_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- haproxy_init_bundle
when:
- haproxy_short_node_names_upgraded | length > 1
- name: add the haproxy short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -358,11 +358,13 @@ outputs:
manila_share_node_names_upgraded is not defined or
manila_share_node_names_upgraded | length == 0
- name: remove manila_share init container on upgrade-scaleup to force re-init
shell: |
if podman inspect manila_share_init_bundle &> /dev/null; then
podman rm manila_share_init_bundle
fi
when: manila_share_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- manila_share_init_bundle
when:
- manila_share_short_node_names_upgraded | length > 1
- name: add the manila_share short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -452,11 +452,13 @@ outputs:
ovn_dbs_short_node_names_upgraded | length == 0
- name: remove ovn_dbs init container on upgrade-scaleup to force re-init
shell: |
if podman inspect ovn_dbs_init_bundle &> /dev/null; then
podman rm ovn_dbs_init_bundle
fi
when: ovn_dbs_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- ovn_dbs_init_bundle
when:
- ovn_dbs_short_node_names_upgraded | length > 1
- name: add the ovn_dbs short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -413,11 +413,13 @@ outputs:
oslo_messaging_notify_node_names_upgraded | length == 0
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
shell: |
if podman inspect rabbitmq_init_bundle &> /dev/null; then
podman rm rabbitmq_init_bundle
fi
when: oslo_messaging_notify_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- rabbitmq_init_bundle
when:
- oslo_messaging_notify_short_node_names_upgraded | length > 1
- name: add the oslo_messaging_notify short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -410,11 +410,13 @@ outputs:
rabbitmq_short_node_names_upgraded | length == 0
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
shell: |
if podman inspect rabbitmq_init_bundle &> /dev/null; then
podman rm rabbitmq_init_bundle
fi
when: rabbitmq_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- rabbitmq_init_bundle
when:
- rabbitmq_short_node_names_upgraded | length > 1
- name: add the rabbitmq short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -419,11 +419,13 @@ outputs:
oslo_messaging_rpc_node_names_upgraded | length == 0
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
shell: |
if podman inspect rabbitmq_init_bundle &> /dev/null; then
podman rm rabbitmq_init_bundle
fi
when: oslo_messaging_rpc_short_node_names_upgraded | length > 1
include_role:
name: tripleo-container-rm
vars:
tripleo_containers_to_rm:
- rabbitmq_init_bundle
when:
- oslo_messaging_rpc_short_node_names_upgraded | length > 1
- name: add the oslo_messaging_rpc short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera