From 81f5b2ac79a5e2a7811bb873e190e80484a901bc Mon Sep 17 00:00:00 2001
From: SamYaple <sam@yaple.net>
Date: Tue, 16 Feb 2016 16:41:44 +0000
Subject: [PATCH] Use "optional" for ceph confs

Also add missing cinder-backup ceph.conf info

TrivialFix

Change-Id: I2b2d85c2d34908a9b11198eb51b3cf359a06bdf7
---
 .../roles/cinder/templates/cinder-backup.json.j2   | 14 ++++++++++++++
 .../roles/cinder/templates/cinder-volume.json.j2   | 10 ++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ansible/roles/cinder/templates/cinder-backup.json.j2 b/ansible/roles/cinder/templates/cinder-backup.json.j2
index 578e4ad801..2210fbb1c3 100644
--- a/ansible/roles/cinder/templates/cinder-backup.json.j2
+++ b/ansible/roles/cinder/templates/cinder-backup.json.j2
@@ -6,6 +6,20 @@
             "dest": "/etc/cinder/cinder.conf",
             "owner": "cinder",
             "perm": "0600"
+        },
+        {
+            "source": "{{ container_config_directory }}/ceph.client.cinder-backup.keyring",
+            "dest": "/etc/ceph/ceph.client.cinder-backup.keyring",
+            "owner": "cinder",
+            "perm": "0600",
+            "optional": "true"
+        },
+        {
+            "source": "{{ container_config_directory }}/ceph.conf",
+            "dest": "/etc/ceph/ceph.conf",
+            "owner": "cinder",
+            "perm": "0600",
+            "optional": "true"
         }
     ]
 }
diff --git a/ansible/roles/cinder/templates/cinder-volume.json.j2 b/ansible/roles/cinder/templates/cinder-volume.json.j2
index 700ba3f39b..531843b37a 100644
--- a/ansible/roles/cinder/templates/cinder-volume.json.j2
+++ b/ansible/roles/cinder/templates/cinder-volume.json.j2
@@ -6,18 +6,20 @@
             "dest": "/etc/cinder/cinder.conf",
             "owner": "cinder",
             "perm": "0600"
-        }{% if enable_ceph | bool %},
+        },
         {
             "source": "{{ container_config_directory }}/ceph.client.cinder.keyring",
             "dest": "/etc/ceph/ceph.client.cinder.keyring",
             "owner": "cinder",
-            "perm": "0600"
+            "perm": "0600",
+            "optional": "true"
         },
         {
             "source": "{{ container_config_directory }}/ceph.conf",
             "dest": "/etc/ceph/ceph.conf",
             "owner": "cinder",
-            "perm": "0600"
-        }{% endif %}
+            "perm": "0600",
+            "optional": "true"
+        }
     ]
 }
-- 
GitLab