diff options
author | Anoop C S <anoopcs@redhat.com> | 2020-05-29 13:03:46 +0530 |
---|---|---|
committer | spuiuk <sachin.prabhu@gmail.com> | 2020-06-19 13:51:30 +0100 |
commit | fc79d28492202a5bc1e16da996fd65cc7b79deee (patch) | |
tree | 7d94094c95724fd213be860c404c9f5ebd4ef3ec | |
parent | a9c6941e0d9f6f5fd1f6280b7d297e12a7ff6ea5 (diff) | |
download | samba-integration-fc79d28492202a5bc1e16da996fd65cc7b79deee.tar.gz samba-integration-fc79d28492202a5bc1e16da996fd65cc7b79deee.tar.xz samba-integration-fc79d28492202a5bc1e16da996fd65cc7b79deee.zip |
Avoid adding volume share to smb.conf using 'user.smb' option
4 files changed, 11 insertions, 8 deletions
diff --git a/vagrant/ansible/cluster-vars.yml b/vagrant/ansible/cluster-vars.yml index 7280276..eb3fcab 100644 --- a/vagrant/ansible/cluster-vars.yml +++ b/vagrant/ansible/cluster-vars.yml @@ -59,3 +59,4 @@ samba_netbios_name: "GLUSTERTEST" samba_users: - { username: 'test1', password: 'x', uid: '2001' } - { username: 'test2', password: 'x', uid: '2002' } +samba_share: "gluster-{{ gluster_cluster_volume }}" diff --git a/vagrant/ansible/roles/client.prep/tasks/main.yml b/vagrant/ansible/roles/client.prep/tasks/main.yml index 0578204..b8819fa 100644 --- a/vagrant/ansible/roles/client.prep/tasks/main.yml +++ b/vagrant/ansible/roles/client.prep/tasks/main.yml @@ -31,5 +31,5 @@ private_interfaces: "{{ ctdb_network_private_interfaces }}" public_interfaces: "{{ ctdb_network_public_interfaces }}" exported_sharenames: - - "gluster-vol" + - "{{ samba_share }}" test_users: "{{ samba_users }}" diff --git a/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml b/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml index 4c1caf5..dfd6fdf 100644 --- a/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml +++ b/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml @@ -46,7 +46,6 @@ performance.nl-cache-timeout: '600', performance.readdir-ahead: 'on', performance.parallel-readdir: 'on', - user.smb: 'on' } run_once: true @@ -70,12 +69,6 @@ state: absent run_once: true -- name: Add acl_xattr VFS module - lineinfile: - dest: /etc/samba/smb.conf - line: "vfs objects = acl_xattr glusterfs" - regexp: "vfs objects" - - name: Create test users user: name: "{{ item.username }}" diff --git a/vagrant/ansible/roles/samba-glusterfs.setup/templates/smb.conf.j2 b/vagrant/ansible/roles/samba-glusterfs.setup/templates/smb.conf.j2 index 74df1ad..32187a9 100644 --- a/vagrant/ansible/roles/samba-glusterfs.setup/templates/smb.conf.j2 +++ b/vagrant/ansible/roles/samba-glusterfs.setup/templates/smb.conf.j2 @@ -17,3 +17,12 @@ printcap name = /dev/null disable spoolss = yes printing = bsd show add printer wizard = no + +[{{ samba_share }}] +comment = For samba share of volume {{ gluster_cluster_volume }} +vfs objects = acl_xattr glusterfs +glusterfs:volume = {{ gluster_cluster_volume }} +glusterfs:logfile = /var/log/samba/glusterfs-{{ gluster_cluster_volume }}.%M.log +glusterfs:loglevel = 7 +path = / +read only = no |