Use path if defined for share

This commit is contained in:
Ian Young 2016-01-01 22:37:59 -08:00
parent a1e2480b6d
commit a34e6c9715
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@
with_items: samba_shares
file:
state: directory
path: "{{ samba_shares_root}}/{{ item.name }}"
path: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}"
owner: root
group: "{{ item.group|default('users') }}"
mode: "{{ item.directory_mode|default('0775') }}"
@ -55,7 +55,7 @@
file:
state: link
path: "/var/www/html/{{ item.name }}"
src: "{{ samba_shares_root }}/{{ item.name }}"
src: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}"
with_items: samba_shares
tags: samba

View File

@ -53,7 +53,7 @@
{% if share.comment is defined %}
comment = {{ share.comment }}
{% endif %}
path = {{ samba_shares_root }}/{{ share.name }}
path = {{ share.path|default([samba_shares_root,share.name]|join('/')) }}
public = {{ share.public|default('no') }}
{% if share.valid_users is defined %}
valid users= {{ share.valid_users }}