geerlingguy / arm-nas

Arm NAS configuration with ZFS.
GNU General Public License v3.0
108 stars 6 forks source link

Automate Samba account management #2

Open geerlingguy opened 6 months ago

geerlingguy commented 6 months ago

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.