Fix deploy/genconfig in check mode

Previously, when running one of the following commands:

  kolla-ansible deploy --check
  kolla-ansible genconfig --check

deployment or configuration generation fails for various reasons.

MariaDB fails to lookup the existing cluster.

Keystone fails to generate cron config.

Nova-cell fails to get the cell settings.

Closes-Bug: #2002661
Change-Id: I5e765f498ae86d213d0a4379ca5d473db1499962
This commit is contained in:
Mark Goddard 2023-01-12 10:27:47 +00:00
parent 10ca82c243
commit 572ff2f8dc
5 changed files with 9 additions and 0 deletions

View File

@ -199,6 +199,7 @@
-i {{ groups['keystone'].index(inventory_hostname) }}
-n {{ (groups['keystone'] | length) }}
changed_when: false
check_mode: false
register: cron_jobs_json
delegate_to: localhost

View File

@ -50,6 +50,7 @@
--silent --skip-column-names
-e 'SHOW STATUS LIKE "wsrep_local_state_comment"'
changed_when: false
check_mode: false
register: check_mariadb_sync_status
no_log: true

View File

@ -18,6 +18,7 @@
changed_when: false
failed_when:
- existing_cells_list.rc != 0
check_mode: false
- name: Extract current cell settings from list
vars:

View File

@ -22,6 +22,7 @@
register: nova_compute_services
changed_when: false
failed_when: false
check_mode: false
retries: 20
delay: 10
until:

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes deployment when using Ansible check mode. `LP#2002661
<https://bugs.launchpad.net/kolla-ansible/+bug/2002661>`__