geerlingguy / arm-nas

Arm NAS configuration with ZFS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automate Samba account management

geerlingguy opened this issue · comments

I would like to fully automate the Samba user account lifecycle in this playbook—though for now, since users are, well... pretty much me, I'm okay with one manual step at the end of the playbook.

I currently have the following task at the end of the playbook:

    # TODO: See https://stackoverflow.com/a/46428282/100134
    # For now, manually run `sudo smbpasswd -a jgeerling`
    - name: Configure Samba passwords (not yet implemented).
      ansible.builtin.meta: noop

The Stack Overflow answer here (https://stackoverflow.com/a/46428282/100134) has some decent advice, but it seems a bit hackneyed. It'd be nice if there were a module I could use for this (or I could write one), so you could just pass an encrypted secret var and Ansible would do the work.