diff options
Diffstat (limited to 'ansible/roles/cinder/templates')
| -rw-r--r-- | ansible/roles/cinder/templates/cinder-volume.json.j2 | 17 | ||||
| -rw-r--r-- | ansible/roles/cinder/templates/cinder.conf.j2 | 7 |
2 files changed, 20 insertions, 4 deletions
diff --git a/ansible/roles/cinder/templates/cinder-volume.json.j2 b/ansible/roles/cinder/templates/cinder-volume.json.j2 index db3891119..5dc729b14 100644 --- a/ansible/roles/cinder/templates/cinder-volume.json.j2 +++ b/ansible/roles/cinder/templates/cinder-volume.json.j2 @@ -6,19 +6,28 @@ "dest": "/etc/cinder/cinder.conf", "owner": "cinder", "perm": "0600" - }{% if cinder_backend_ceph | bool %}, + }, { "source": "{{ container_config_directory }}/ceph.*", "dest": "/etc/ceph/", "owner": "cinder", - "perm": "0700" + "perm": "0700", + "optional": {{ (not cinder_backend_ceph | bool) | string | lower }} }, { "source": "{{ container_config_directory }}/ceph.conf", "dest": "/etc/ceph/ceph.conf", "owner": "cinder", - "perm": "0600" - }{% endif %} + "perm": "0600", + "optional": {{ (not cinder_backend_ceph | bool) | string | lower }} + }, + { + "source": "{{ container_config_directory }}/nfs_shares", + "dest": "/etc/cinder/nfs_shares", + "owner": "cinder", + "perm": "0600", + "optional": {{ (not enable_cinder_backend_nfs | bool) | string | lower }} + } ], "permissions": [ { diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index a34ee75fd..16f07b976 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -99,5 +99,12 @@ rbd_secret_uuid = {{ rbd_secret_uuid }} report_discard_supported = True {% endif %} +{% if enable_cinder_backend_nfs | bool %} +[nfs-1] +volume_driver = cinder.volume.drivers.nfs.NfsDriver +volume_backend_name = nfs-1 +nfs_shares_config = /etc/cinder/nfs_shares +{% endif %} + [privsep_entrypoint] helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf |
