diff options
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 |