From d2b24a68e570d1a701f369d173b405dd6736e52f Mon Sep 17 00:00:00 2001 From: Bengt Giger Date: Wed, 5 Dec 2018 15:43:18 +0100 Subject: [PATCH 1/2] include options use absolute paths Configuration includes needs an absolute path, at least on Debian. Relative paths are ignored. As the include files are copied to {{ samba_configuration_dir }}, I suggest to prefix the corresponding includes in the template with the same path. --- templates/smb.conf.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/smb.conf.j2 b/templates/smb.conf.j2 index a57d8bd..d3b63a6 100755 --- a/templates/smb.conf.j2 +++ b/templates/smb.conf.j2 @@ -79,7 +79,7 @@ {% endif %} {% if samba_global_include is defined %} - include = {{ samba_global_include }} + include = {{ samba_configuration_dir }}/{{ samba_global_include }} {% endif %} {% if samba_load_homes %} @@ -91,7 +91,7 @@ {% endif %} {% if samba_home_include is defined %} - include = {{ samba_home_include }} + include = {{{ samba_configuration_dir }}/{ samba_home_include }} {% endif %} {% if samba_shares|length > 0 %} @@ -138,7 +138,7 @@ directory mode = {{ share.directory_mode|default('0775') }} force directory mode = {{ share.force_directory_mode|default('0775') }} {% if share.include_file is defined %} - include = {{ share.include_file }} + include = {{ samba_configuration_dir }}/{{ share.include_file }} {% endif %} {% endfor %} From eaefa6de3081a4d5fe35b9472a911dba46a6fead Mon Sep 17 00:00:00 2001 From: Bengt Giger Date: Wed, 5 Dec 2018 15:49:00 +0100 Subject: [PATCH 2/2] include options use absolute paths Configuration includes needs an absolute path, at least on Debian. Relative paths are ignored. As the include files are copied to {{ samba_configuration_dir }}, I suggest to prefix the corresponding includes in the template with the same path. Fixes unbalanced curly bracket --- templates/smb.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/smb.conf.j2 b/templates/smb.conf.j2 index d3b63a6..39a14c0 100755 --- a/templates/smb.conf.j2 +++ b/templates/smb.conf.j2 @@ -91,7 +91,7 @@ {% endif %} {% if samba_home_include is defined %} - include = {{{ samba_configuration_dir }}/{ samba_home_include }} + include = {{ samba_configuration_dir }}/{{ samba_home_include }} {% endif %} {% if samba_shares|length > 0 %}