From bfb0d5b2b9edb912fbd59819bce9f814513e41ed Mon Sep 17 00:00:00 2001 From: tdltdc Date: Sun, 19 Nov 2023 16:01:13 +0100 Subject: [PATCH] Force interpretation of samba_enable_netbios as boolean --- roles/server/handlers/main.yml | 2 +- roles/server/tasks/main.yml | 2 +- roles/server/templates/smb.conf.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/server/handlers/main.yml b/roles/server/handlers/main.yml index cc8d129..e8e1bec 100644 --- a/roles/server/handlers/main.yml +++ b/roles/server/handlers/main.yml @@ -8,4 +8,4 @@ ansible.builtin.service: name: "{{ nmb_service }}" state: restarted - when: samba_enable_netbios + when: samba_enable_netbios | bool diff --git a/roles/server/tasks/main.yml b/roles/server/tasks/main.yml index 2d600f0..b3abf81 100644 --- a/roles/server/tasks/main.yml +++ b/roles/server/tasks/main.yml @@ -146,7 +146,7 @@ state: started enabled: true tags: samba - when: samba_enable_netbios + when: samba_enable_netbios | bool - name: Create Samba users if they don't exist yet ansible.builtin.shell: > diff --git a/roles/server/templates/smb.conf.j2 b/roles/server/templates/smb.conf.j2 index 7c5d829..4ade910 100644 --- a/roles/server/templates/smb.conf.j2 +++ b/roles/server/templates/smb.conf.j2 @@ -49,7 +49,7 @@ {% endif %} # Name resolution -{% if not samba_enable_netbios %} +{% if not samba_enable_netbios | bool %} disable netbios = yes {% endif %} wins support = {{ samba_wins_support | ternary('yes', 'no') }}