diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2020-07-23 11:05:32 +0100 |
---|---|---|
committer | spuiuk <sachin.prabhu@gmail.com> | 2020-08-24 12:26:57 +0100 |
commit | 47f4bd3d99292ca5c93c010f4abbc6036ecb44c5 (patch) | |
tree | b75b9bed52104c132267fb37271173b394ed0f1a /vagrant | |
parent | e29841ad6a65d2f79f18181a5ac256f321bba756 (diff) | |
download | samba-integration-47f4bd3d99292ca5c93c010f4abbc6036ecb44c5.tar.gz samba-integration-47f4bd3d99292ca5c93c010f4abbc6036ecb44c5.tar.xz samba-integration-47f4bd3d99292ca5c93c010f4abbc6036ecb44c5.zip |
Split out permission fixing of shares when setting up samba
We cannot loop within a block of commands. So we move the functions
required to set permissions to a new yml file and use include_task
instead.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Diffstat (limited to 'vagrant')
-rw-r--r-- | vagrant/ansible/roles/samba-glusterfs.setup/tasks/fix_share_permissions.yml | 16 | ||||
-rw-r--r-- | vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml | 21 |
2 files changed, 20 insertions, 17 deletions
diff --git a/vagrant/ansible/roles/samba-glusterfs.setup/tasks/fix_share_permissions.yml b/vagrant/ansible/roles/samba-glusterfs.setup/tasks/fix_share_permissions.yml new file mode 100644 index 0000000..f5db4e6 --- /dev/null +++ b/vagrant/ansible/roles/samba-glusterfs.setup/tasks/fix_share_permissions.yml @@ -0,0 +1,16 @@ +- name: Mount gluster volume using glusterfs + mount: + path: /mnt-fuse + src: "{{ volume }}" + fstype: glusterfs + state: mounted + +- name: Set permission of volume root to 0777 + file: + path: /mnt-fuse + mode: '0777' + +- name: Unmount mounted fuse glusterfs mount + mount: + path: /mnt-fuse + state: absent diff --git a/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml b/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml index 2624917..2d71157 100644 --- a/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml +++ b/vagrant/ansible/roles/samba-glusterfs.setup/tasks/main.yml @@ -55,23 +55,10 @@ insertafter: EOF - name: Mount glusterfs using fuse mount and set world writable permissions - block: - - name: Mount gluster volume using glusterfs - mount: - path: /mnt-fuse - src: "localhost:/{{ replicated_cluster_volume }}" - fstype: glusterfs - state: mounted - - - name: Set permission of share root to 0777 - file: - path: /mnt-fuse - mode: '0777' - - - name: Unmount mounted fuse glusterfs mount - mount: - path: /mnt-fuse - state: absent + include_tasks: + file: "fix_share_permissions.yml" + vars: + volume: "localhost:/{{ replicated_cluster_volume }}" run_once: true - name: Create test users |