From ec14e608d042a5cef15288e0d789af34c5d263fd Mon Sep 17 00:00:00 2001 From: Paul Montero Date: Thu, 13 Oct 2016 18:05:53 -0500 Subject: [PATCH 1/2] Add the ability to set owner to the path --- README.md | 3 ++- tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ff0f13..3b01148 100644 --- a/README.md +++ b/README.md @@ -100,9 +100,10 @@ A complete overview of share options follows below. Only `name` is required, the | Option | Default | Comment | | :--- | :--- | :--- | | `name` | - | The name of the share. | -| `path` | /{{samba_shares_root}}/{{name}} | The path to the share directory. | +| `path` | /{{samba_shares_root}}/{{name}} | The path to the share directory. | | `comment` | - | A comment string for the share | | `public` | `no` | Controls read access for guest users | +| `path_owner` | `root` | Set the owner of the path | | `valid_users` | - | Controls read access for registered users. Use the syntax of the corresponding Samba setting. | | `write_list` | - | Controls write access for registered users. Use the syntax of the corresponding Samba setting. | | `group` | `users` | The user group files in the share will be added to. | diff --git a/tasks/main.yml b/tasks/main.yml index e59fba6..ea917bd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -43,7 +43,7 @@ file: state: directory path: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}" - owner: root + owner: "{{ item.path_owner|default('root') }}" group: "{{ item.group|default('users') }}" mode: "{{ item.directory_mode|default('0775') }}" setype: "{{ item.setype|default('samba_share_t') }}" From cb6aac6aa28b5a3233f9092568e9d2030e022984 Mon Sep 17 00:00:00 2001 From: Paul Montero Date: Fri, 21 Oct 2016 12:04:43 -0500 Subject: [PATCH 2/2] Change the key path_owner by owner --- README.md | 2 +- tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b01148..4bd488a 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ A complete overview of share options follows below. Only `name` is required, the | `path` | /{{samba_shares_root}}/{{name}} | The path to the share directory. | | `comment` | - | A comment string for the share | | `public` | `no` | Controls read access for guest users | -| `path_owner` | `root` | Set the owner of the path | +| `owner` | `root` | Set the owner of the path | | `valid_users` | - | Controls read access for registered users. Use the syntax of the corresponding Samba setting. | | `write_list` | - | Controls write access for registered users. Use the syntax of the corresponding Samba setting. | | `group` | `users` | The user group files in the share will be added to. | diff --git a/tasks/main.yml b/tasks/main.yml index ea917bd..392370a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -43,7 +43,7 @@ file: state: directory path: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}" - owner: "{{ item.path_owner|default('root') }}" + owner: "{{ item.owner|default('root') }}" group: "{{ item.group|default('users') }}" mode: "{{ item.directory_mode|default('0775') }}" setype: "{{ item.setype|default('samba_share_t') }}"