From cc2e3743bffe03fd0d9b4f4ea35cf67ac8fbecc0 Mon Sep 17 00:00:00 2001 From: Duong Ha-Quang Date: Tue, 2 Jan 2018 14:53:34 +0700 Subject: [PATCH] Prevent cinder conf from copy nfs_shares to unrelated nodes Prevent cinder conf from copy nfs_shares to all nodes instead of just cinder-volume. Change-Id: I4f94b6c0ca8b628c1babee7fff0b66fb5a8df257 Closes-Bug: #1713010 --- ansible/roles/cinder/tasks/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/cinder/tasks/config.yml b/ansible/roles/cinder/tasks/config.yml index 59b2ff225a..504e3ff990 100644 --- a/ansible/roles/cinder/tasks/config.yml +++ b/ansible/roles/cinder/tasks/config.yml @@ -87,6 +87,8 @@ template: src: "{{ item }}" dest: "{{ node_config_directory }}/cinder-volume/nfs_shares" + when: + - inventory_hostname in groups[cinder_services["cinder-volume"]["group"]] with_first_found: - files: - "{{ node_custom_config }}/nfs_shares.j2"