From 81cfc98897767f83438b6daee2ee4ce01e056f0e Mon Sep 17 00:00:00 2001 From: John Fulton Date: Fri, 18 Mar 2022 07:52:07 -0400 Subject: [PATCH] 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 --- tripleo_ansible/roles/backup_and_restore/tasks/setup_rear.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tripleo_ansible/roles/backup_and_restore/tasks/setup_rear.yml b/tripleo_ansible/roles/backup_and_restore/tasks/setup_rear.yml index de120966a..623e72a99 100644 --- a/tripleo_ansible/roles/backup_and_restore/tasks/setup_rear.yml +++ b/tripleo_ansible/roles/backup_and_restore/tasks/setup_rear.yml @@ -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