aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorOwen Jones <owen@stackhpc.com>2026-08-10 11:44:47 +0100
committerOwen Jones <owen@stackhpc.com>2026-08-12 20:53:46 +0100
commitfe4f6adaf01e93af39cd28d3ad57d45b1db11884 (patch)
treefdeeda27747de2ef382c1cce67280d7c66970d21 /ansible
parent0d656aa1e1fcc04ea2ffab5068aa934784c88f64 (diff)
downloadkolla-ansible-fe4f6adaf01e93af39cd28d3ad57d45b1db11884.tar.gz
kolla-ansible-fe4f6adaf01e93af39cd28d3ad57d45b1db11884.zip
fix: Delegate fernet key distribution to correct host
The key used to group hosts was previously changed[0] but the group not updated in the task used to distribute fernet keys. When migrating hosts this could lead to the task being delegated to a host without keys, resulting in all hosts losing their keys. 0: Change I1db88e28a828ebf073f018b2bae1d9556ec22807 Closes-Bug: #2163158 Change-Id: Ia76f3e6cb41a30b88ac885832755ebe5264ad9fc Signed-off-by: Owen Jones <owen@stackhpc.com> (cherry picked from commit 541a26c7d4dd1988eda64327c6b08aa831ee3162)
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/keystone/tasks/distribute_fernet.yml6
1 files changed, 2 insertions, 4 deletions
diff --git a/ansible/roles/keystone/tasks/distribute_fernet.yml b/ansible/roles/keystone/tasks/distribute_fernet.yml
index a780cf8da..2bb346da9 100644
--- a/ansible/roles/keystone/tasks/distribute_fernet.yml
+++ b/ansible/roles/keystone/tasks/distribute_fernet.yml
@@ -9,11 +9,9 @@
retries: 10
delay: 5
-- name: Run key distribution
+- name: Run fernet key distribution
become: true
changed_when: true
ansible.builtin.command: "{{ kolla_container_engine }} exec -t {{ keystone_services['keystone-fernet']['container_name'] }} /usr/bin/fernet-push.sh"
run_once: true
- delegate_to: >-
- {% if groups['keystone_fernet_running'] is defined -%}
- {{ groups['keystone_fernet_running'][0] }}{%- else -%}{{ groups['keystone'][0] }}{%- endif %}
+ delegate_to: "{{ (groups['keystone_fernet_running_True'] | default(groups['keystone']))[0] }}"