nfs.json.j2 473 B

1234567891011121314151617181920212223
  1. {
  2. "kind": "PersistentVolume",
  3. "apiVersion": "v1beta3",
  4. "metadata": {
  5. "name": "pv-{{ inventory_hostname | regex_replace("\.", "-") }}-{{ item.name }}",
  6. "labels": {
  7. "type": "nfs"
  8. }
  9. },
  10. "spec": {
  11. "capacity": {
  12. "storage": "{{ item.size }}"
  13. },
  14. "accessModes": [
  15. "ReadWriteOnce"
  16. ],
  17. "NFS": {
  18. "Server": "{{ inventory_hostname }}",
  19. "Path": "{{ mount_dir }}/{{ item.name }}",
  20. "ReadOnly": false
  21. }
  22. }
  23. }