Use kayobe_container only when service is enabled

The overcloud-extras playbook called during overcloud service deploy
would always invoke the kayobe_container module, even when the service
(inspection_store or opensm) was disabled.

With podman, this has the side effect of attempting to pull the image
from the registry, even when `state` is `absent`.

Change behaviour to invoke kayobe_container only when the service is
enabled. This means that a manual container removal is necessary now to
disable these services.

Change-Id: Id3ebd6836ba8f3b2101b94637a89f97fb0eb59e1
This commit is contained in:
Pierre Riteau 2025-01-06 15:33:22 +01:00
parent 70af189ae2
commit a6ba61f462
3 changed files with 11 additions and 2 deletions

View File

@ -8,9 +8,10 @@
read_only: "{{ item.value.read_only | default(omit) }}"
restart_policy: "{{ inspection_store_restart_policy }}"
restart_retries: "{{ inspection_store_restart_retries | default(omit) }}"
state: "{{ item.value.enabled | ternary('started', 'absent') }}"
state: started
volumes: "{{ item.value.volumes }}"
network_mode: "{{ item.value.network_mode | default(omit) }}"
with_dict: "{{ inspection_store_services }}"
notify:
- Ensure inspection store data directory exists
when: item.value.enabled | bool

View File

@ -8,6 +8,7 @@
read_only: "{{ item.value.read_only | default(omit) }}"
restart_policy: "{{ opensm_restart_policy }}"
restart_retries: "{{ opensm_restart_retries | default(omit) }}"
state: "{{ item.value.enabled | ternary('started', 'absent') }}"
state: started
volumes: "{{ item.value.volumes }}"
with_dict: "{{ opensm_services }}"
when: item.value.enabled | bool

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Stops automatically removing the ``inspection_store`` and ``opensm``
containers when they become disabled in Kayobe configuration. Manual
container removal is now necessary, except in the case of a full service
destroy.