Files
kolla-ansible/ansible/roles/nova-cell/tasks/get_cell_settings.yml
Roman Krček ab6eb989ae Update cell0 database connection
When kolla VIP address is changed the cell0 database connection is
now updated to the new address.

Closes-bug: #1915302
Change-Id: I35be54efb5aaa230702d0cebaae04f1e64c3bca3
Signed-off-by: Roman Krček <roman.krcek@tietoevry.com>
2024-04-08 13:19:08 +02:00

28 lines
856 B
YAML

---
- name: Get a list of existing cells
vars:
nova_conductor: "{{ nova_cell_services['nova-conductor'] }}"
become: true
kolla_container:
action: "start_container"
command: bash -c 'sudo -E kolla_set_configs && nova-manage cell_v2 list_cells --verbose'
common_options: "{{ docker_common_options }}"
detach: False
image: "{{ nova_conductor.image }}"
labels:
BOOTSTRAP:
name: "nova_list_cells"
restart_policy: oneshot
volumes: "{{ nova_cell_get_settings_volumes }}"
register: existing_cells_list
changed_when: false
failed_when:
- existing_cells_list.rc != 0
check_mode: false
- name: Extract current cell settings from list
vars:
nova_conductor: "{{ nova_cell_services['nova-conductor'] }}"
set_fact:
nova_cell_settings: "{{ existing_cells_list | extract_cell(nova_cell_name) }}"