From fda9ec84522330b80bcc8fc7be90eabb4d256ac6 Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Mon, 2 Apr 2018 22:25:51 +0100 Subject: [PATCH] Add samba_server_max_protocol parameter --- README.md | 3 ++- templates/smb.conf.j2 | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e793048..bf7ce2e 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,9 @@ No specific requirements | `samba_map_to_guest` | `bad user` | Behaviour when unregistered users access the shares. | | `samba_netbios_name` | `{{ ansible_hostname }}` | The NetBIOS name of this server. | | `samba_passdb_backend` | `tdbsam` | Password database backend. | -| `samba_realm` | - | Realm domain name | +| `samba_realm` | - | Realm domain name | | `samba_security` | `user` | Samba security setting | +| `samba_server_max_protocol` | - | Specify a maximum protocol version offered by the server. | | `samba_server_string` | `fileserver %m` | Comment string for the server. | | `samba_shares` | [] | List of dicts containing share definitions. See below for details. | | `samba_shares_root` | `/srv/shares` | Directories for the shares are created under this directory. | diff --git a/templates/smb.conf.j2 b/templates/smb.conf.j2 index a0109f9..303d1d2 100755 --- a/templates/smb.conf.j2 +++ b/templates/smb.conf.j2 @@ -30,6 +30,11 @@ server string = {{ samba_server_string }} guest account = {{ samba_guest_account }} {% endif %} +{% if samba_server_max_protocol is defined %} + # Maximum protocol version offered by the server + server max protocol = {{ samba_server_max_protocol }} +{% endif %} + {% if samba_interfaces|length > 0 %} interfaces = {{ samba_interfaces }} {% endif %}