Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ci/playbooks/cinder-nfs-enable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
_cinder_nfs_secret_files:
- cinder-volume-nfs-secrets.yaml
- cinder-volume-nfs-secrets-2.yaml
_cinder_nfs_backends:
- nfs
- nfs-2
tasks:
- name: Ensure the kustomizations dir exists
ansible.builtin.file:
Expand Down Expand Up @@ -39,16 +42,17 @@
ansible.builtin.template:
dest: "{{ cifmw_controlplane_kustomizations_path }}/cinder-backup-nfs-sercrets.yaml"
src: "cinder-backup-nfs-secrets.yaml.j2"
mode: '640'
mode: "640"

- name: Create the definition of the secrets
vars:
share: "{{ cifmw_nfs_shares[indx] }}"
name: "{{ filename | splitext | first }}"
backend_name: "{{ _cinder_nfs_backends[indx] }}"
ansible.builtin.template:
dest: "{{ cifmw_controlplane_kustomizations_path }}/{{ filename }}"
src: "cinder-volume-nfs-secrets.yaml.j2"
mode: '640'
mode: "640"
loop: "{{ _cinder_nfs_secret_files }}"
loop_control:
loop_var: filename
Expand All @@ -70,7 +74,7 @@
ansible.builtin.template:
dest: "{{ cifmw_controlplane_kustomizations_path }}/nfs_backend.yaml"
src: "nfs_backend.yaml.j2"
mode: '640'
mode: "640"

# FIXME: copy with inline content does not support templating, so this should be reworked
- name: Create kustomization to really enable NFS shares as backends for cinder and cinder-backup
Expand Down
2 changes: 1 addition & 1 deletion ci/playbooks/templates/cinder-volume-nfs-secrets.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ metadata:
type: Opaque
stringData:
{{ name }}: |
[nfs]
[{{ backend_name }}]
nas_host={{ cifmw_nfs_ip }}
nas_share_path={{ '/data/' + share }}
4 changes: 2 additions & 2 deletions ci/playbooks/templates/nfs_backend.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ spec:
networkAttachments:
- storage
customServiceConfig: |
[nfs]
volume_backend_name=nfs
[nfs-2]
volume_backend_name=nfs-2
volume_driver=cinder.volume.drivers.nfs.NfsDriver
nfs_snapshot_support=true
nas_secure_file_operations=false
Expand Down