From e1738d774d2f66d58b0c9acf52f03045ae60b5df Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Wed, 9 Sep 2015 12:07:50 +0100 Subject: [PATCH] Ensure cinder-backup-related variables are defined This commit simply updates ceph_client/tasks/ceph_auth.yml to ensure that cinder_service_backup_program_enabled and cinder_service_backup_driver are defined before trying to evaluate them. On a normal deployment, this is not an issue but when running os-nova-install.yml on an AIO where ceph support is enabled, this variable evaluation fails as the AIO host is part of both cinder_backup and nova_compute groups, but does not have access to these variable defaults in os_cinder/defaults/main.yml since we're operating on the os_nova role. An alternate solution would be to add these variable defaults to group_vars, however as the os_nova role doesn't actually need to use them it's probably cleaner to just check if they're defined. Change-Id: I2c35b14f42b2c452aa68a611ab68c612db1b07a4 Closes-Bug: #1493799 --- tasks/ceph_auth.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/ceph_auth.yml b/tasks/ceph_auth.yml index d906180..0bf31ce 100644 --- a/tasks/ceph_auth.yml +++ b/tasks/ceph_auth.yml @@ -28,7 +28,9 @@ - client when: > inventory_hostname in groups[item.0.component] and - (item.0.component != 'cinder_backup' or (cinder_service_backup_program_enabled | bool and cinder_service_backup_driver == 'cinder.backup.drivers.ceph')) + (item.0.component != 'cinder_backup' or + ((cinder_service_backup_program_enabled is defined and cinder_service_backup_program_enabled | bool) and + (cinder_service_backup_driver is defined and cinder_service_backup_driver == 'cinder.backup.drivers.ceph'))) always_run: true changed_when: false delegate_to: '{{ ceph_mon_host }}'