create_persistent_volumes.yml 1.2 KB

1234567891011121314151617181920212223242526272829
  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. persistentlocalstorage_path: "{{ openshift_persistentlocalstorage_path | default('/mnt/local-storage') }}"
  12. roles:
  13. - role: openshift_persistentlocalstorage
  14. when: openshift_persistentlocalstorage_enabled | default(False) | bool
  15. - name: Create Hosted Resources - Persistent Local Storage Classes
  16. hosts: nodes
  17. tasks:
  18. - name: Create Persistent Local Storage Classes Directories
  19. file:
  20. path: "{{ openshift_persistentlocalstorage_path | default('/mnt/local-storage') }}/{{ item }}"
  21. owner: root
  22. group: root
  23. mode: 0770
  24. state: directory
  25. setype: svirt_sandbox_file_t
  26. with_items: "{{ openshift_persistentlocalstorage_classes }}"
  27. when: openshift_persistentlocalstorage_classes | default([]) | length > 0 and openshift_persistentlocalstorage_enabled | bool