create_persistent_volumes.yml 1.0 KB

12345678910111213141516171819202122232425262728
  1. ---
  2. - name: Create Hosted Resources - persistent volumes
  3. hosts: oo_first_master
  4. roles:
  5. - role: openshift_persistent_volumes
  6. - name: Create Hosted Resources - Persistent Local Storage Provider
  7. hosts: oo_first_master
  8. vars:
  9. persistentlocalstorage_project: "{{ openshift_persistentlocalstorage_project | default('local-storage') }}"
  10. persistentlocalstorage_classes: "{{ openshift_persistentlocalstorage_classes | default([]) }}"
  11. roles:
  12. - role: openshift_persistentlocalstorage
  13. when: openshift_persistentlocalstorage_enabled | bool
  14. - name: Create Hosted Resources - Persistent Local Storage Classes
  15. hosts: nodes
  16. tasks:
  17. - name: Create Persistent Local Storage Classes Directories
  18. file:
  19. path: "/mnt/local-storage/{{ item }}"
  20. owner: root
  21. group: root
  22. mode: 0770
  23. state: directory
  24. setype: svirt_sandbox_file_t
  25. with_items: "{{ openshift_persistentlocalstorage_classes }}"
  26. when: openshift_persistentlocalstorage_classes | default([]) | length > 0 and openshift_persistentlocalstorage_enabled | bool