Do not reference backup/restore config unless defined

Before referencing BACKUP_PROG_CRYPT_ENABLED key in
tripleo_backup_and_restore_local_config ensure first
that it is defined.

Change-Id: Ie83f18e356aa4a51eecb2214449db713ddf9d99b
Closes-Bug: #1965528
This commit is contained in:
John Fulton 2022-03-18 07:52:07 -04:00
parent 612301b0b9
commit 81cfc98897

View File

@ -141,6 +141,8 @@
regexp: "BACKUP_PROG_CRYPT_KEY"
state: absent
when:
- tripleo_backup_and_restore_local_config is defined
- tripleo_backup_and_restore_local_config["BACKUP_PROG_CRYPT_ENABLED"] is defined
- not (tripleo_backup_and_restore_local_config["BACKUP_PROG_CRYPT_ENABLED"] | bool)
tags:
- bar_setup_rear