Browse Source

Merge pull request #35 from goetzk/include-config-files

Load arbitrary config files in every section.
master
Bert Van Vreckem 3 years ago
committed by GitHub
parent
commit
65f32566ea
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      README.md
  2. 12
      templates/smb.conf.j2

3
README.md

@ -36,7 +36,9 @@ No specific requirements
| `samba_create_varwww_symlinks` | false | When true, symlinks are created in web docroot to the shares. (`var/www/` or `/var/www/html` depending on platform) |
| `samba_cups_server` | localhost:631 | Value for the global option `cups server` (only needed when `samba_printer_type` is "cups") |
| `samba_domain_master` | true | When true, smbd enables WAN-wide browse list collation |
| `samba_global_include` | - | Samba combatible configuration file with options to be loaded to [global] section |
| `samba_guest_account` | - | Guest account for unknown users |
| `samba_home_include` | - | Samba combatible configuration file with options to be loaded to [home] section |
| `samba_interfaces` | [] | List of network interfaces used for browsing, name registration, etc. |
| `samba_load_homes` | false | When true, user home directories are accessible. |
| `samba_load_printers` | false | When true, printers attached to the host are shared |
@ -150,6 +152,7 @@ A complete overview of share options follows below. Only `name` is required, the
| `comment` | - | A comment string for the share |
| `create_mode` | `0664` | See the Samba documentation for details. |
| `directory_mode` | `0775` | See the Samba documentation for details. |
| `include_file` | - | Samba combatible configuration file with options to be included for this share. |
| `force_create_mode` | `0664` | See the Samba documentation for details. |
| `force_directory_mode` | `0775` | See the Samba documentation for details. |
| `group` | `users` | The user group files in the share will be added to. |

12
templates/smb.conf.j2

@ -73,6 +73,10 @@
nt pipe support = no
{% endif %}
{% if samba_global_include is defined %}
include = {{ samba_global_include }}
{% endif %}
{% if samba_load_homes %}
## Make home directories accessible
[homes]
@ -81,6 +85,10 @@
writable = yes
{% endif %}
{% if samba_home_include is defined %}
include = {{ samba_home_include }}
{% endif %}
{% if samba_shares|length > 0 %}
## Shared directories
{% for share in samba_shares %}
@ -121,6 +129,10 @@
force create mode = {{ share.force_create_mode|default('0664') }}
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 }}
{% endif %}
{% endfor %}
{% endif%}

Loading…
Cancel
Save