nc_storage.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. - name: Storage... mount glusterFS_1
  2. mount:
  3. src: "{{ groups['gluster_servers'][0] }}:ncgluster1"
  4. path: "{{ nc_data_dir }}"
  5. fstype: glusterfs
  6. opts: acl
  7. state: mounted
  8. #- name: Main... Mount shared directories
  9. # mount:
  10. # src: "{{ nfs_server }}:{{ item.src }}"
  11. # path: "{{ item.path }}"
  12. # state: mounted
  13. # fstype: nfs
  14. # opts: nosharecache,context="system_u:object_r:httpd_sys_rw_content_t:s0"
  15. # with_items:
  16. # - { src: "{{ nfs_data_path }}", path: "{{ nc_data_dir }}" }
  17. # - { src: "{{ nfs_web_path }}", path: "{{ http_webroot }}/nextcloud" }
  18. # when: nc_multiple != ""
  19. - name: Storage... acl glusterFS_1
  20. acl:
  21. path: "{{ nc_data_dir }}"
  22. entry: "user:{{ nextcloud_websrv_user }}:rwX"
  23. state: present
  24. - name: Storage... acl default glusterFS_1
  25. acl:
  26. path: "{{ nc_data_dir }}"
  27. entry: "default:user:{{ nextcloud_websrv_user }}:rwX"
  28. state: present
  29. - name: Storage... permission glusterFS_1
  30. file:
  31. owner: "{{ nextcloud_websrv_user }}"
  32. group: "{{ nextcloud_websrv_group }}"
  33. path: "{{ nc_data_dir }}"
  34. - name: Storage... mount glusterFS_2
  35. mount:
  36. src: "{{ groups['gluster_servers'][0] }}:ncgluster2"
  37. path: "{{ http_webroot }}"
  38. fstype: glusterfs
  39. opts: acl
  40. state: mounted
  41. - name: Storage... acl glusterFS_2
  42. acl:
  43. path: "{{ http_webroot }}"
  44. entry: "user:{{ nextcloud_websrv_user }}:rwX"
  45. state: present
  46. - name: Storage... acl default glusterFS_2
  47. acl:
  48. path: "{{ http_webroot }}"
  49. entry: "default:user:{{ nextcloud_websrv_user }}:rwX"
  50. state: present
  51. - name: Storage... permission glusterFS_2
  52. file:
  53. owner: "{{ nextcloud_websrv_user }}"
  54. group: "{{ nextcloud_websrv_group }}"
  55. path: "{{ http_webroot }}"
  56. #- name: Storage... Ensure Nextcloud directories are 0750
  57. # shell: find {{ http_webroot }}/nextcloud -type d -exec chmod -c 0750 {} \;
  58. # register: nc_installation_chmod_result
  59. # changed_when: "nc_installation_chmod_result.stdout != \"\""
  60. #
  61. #- name: Storage... Ensure Nextcloud files are 0640
  62. # shell: find {{ http_webroot }}/nextcloud -type f -exec chmod -c 0640 {} \;
  63. # register: nc_installation_chmod_result
  64. # changed_when: "nc_installation_chmod_result.stdout != \"\""
  65. #- name: Storage... Setting stronger directories ownership
  66. # file:
  67. # path: "{{ item }}"
  68. # state: directory
  69. # owner: "{{ nextcloud_websrv_user }}"
  70. # group: "{{ nextcloud_websrv_group }}"
  71. # recurse: yes
  72. # mode: 0750
  73. # with_items:
  74. # - "{{ nc_data_dir }}"
  75. # - "{{ http_webroot }}"