nfs.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. - name: Install NFS storage plugin dependencies
  3. action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present"
  4. when: not openshift.common.is_atomic | bool
  5. - name: Check for existence of virt_use_nfs seboolean
  6. command: getsebool virt_use_nfs
  7. register: virt_use_nfs_output
  8. when: ansible_selinux and ansible_selinux.status == "enabled"
  9. failed_when: false
  10. changed_when: false
  11. - name: Set seboolean to allow nfs storage plugin access from containers
  12. seboolean:
  13. name: virt_use_nfs
  14. state: yes
  15. persistent: yes
  16. when: ansible_selinux and ansible_selinux.status == "enabled" and virt_use_nfs_output.rc == 0
  17. - name: Check for existence of virt_sandbox_use_nfs seboolean
  18. command: getsebool virt_sandbox_use_nfs
  19. register: virt_sandbox_use_nfs_output
  20. when: ansible_selinux and ansible_selinux.status == "enabled"
  21. failed_when: false
  22. changed_when: false
  23. - name: Set seboolean to allow nfs storage plugin access from containers(sandbox)
  24. seboolean:
  25. name: virt_sandbox_use_nfs
  26. state: yes
  27. persistent: yes
  28. when: ansible_selinux and ansible_selinux.status == "enabled" and virt_sandbox_use_nfs_output.rc == 0