This installs WSDD from the Ubuntu repositories so Windows hosts can see the Samba shares for NETLOGON and SYSVOL. This implemention works with a Samba server running as a DC unlike the newer WSDD2 which complains if it cannot start smbd.

Manual Process

Install wsdd and then create the confg file to set the domain to be advertised.

Ansible Role: wsdd

This was created for Building an additional Samba 4 Domain Controller 2 but should be used for any Linux host offering Windows / SMD / CIFS shares to Windows servers so Windows can actually see them.

File Structure

This is a standard Ansible role with as single tasks .yaml file, three config files, a meta to keep Ansible happy and a README.md for my own notes.

gitdeploy  

  meta
    main.yaml

  tasks
    main.yaml

  templates
    wsdd.conf.j2

  README.md

tasks/main.yaml

This is a really simple role that installs wsdd-server and then drop the config file with

--- # Ansible Role Tasks

# Role for WSDD

- name: Install WSDD package
  become: true
  ansible.builtin.apt:
  package:
  - wsdd-server

- name: Configure WSDD server
  become: true
  ansible.builtin.template:
    src: wsdd.conf.j2
    dest: /etc/wsdd.conf
    owner: root
    group: root
    mode: '0644'

templates/wsdd.conf.j2

This sets the simple domain using the Ansible Inventory, converted to upper case.

WSDD_PARAMS="-d {{ ad_domain.split('.')[0] | upper }}"