From e4be065724d54488fa0be056d27d545853634ceb Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Mon, 27 Feb 2017 09:51:36 -0800 Subject: [PATCH] Provide empty default for cinder_backends In the 'Create nfs shares export file' task, default cinder_backends to an empty dict to avoid fatal errors when looping through an undefined var. Change-Id: I8dc9d61fba42bd58d5d84dd3293e95a6ff4ab768 --- tasks/cinder_post_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/cinder_post_install.yml b/tasks/cinder_post_install.yml index ce067959..7eb8fa21 100644 --- a/tasks/cinder_post_install.yml +++ b/tasks/cinder_post_install.yml @@ -67,7 +67,7 @@ template: src: nfs_shares.j2 dest: "{{ item.value.nfs_shares_config }}" - with_dict: "{{ cinder_backends }}" + with_dict: "{{ cinder_backends | default({}) }}" when: - item.value.nfs_shares_config is defined - inventory_hostname in groups['cinder_volume']