Files
configpolicy/users.yml
Dustin C. Hatch 3bed59055c users: Do not apply sudo role on Samba DCs
Users, auth, etc. for domain controllers will be handled by the
`create-dc.yml` playbook.  I haven't decided exactly how this playbook
will get applied, I want to make sure the host provisioner is able to
successfully provision machines in the _samba-dc_ group nonetheless.
2025-10-22 21:13:03 -05:00

27 lines
527 B
YAML

- hosts: 'sudo:!samba-dc'
roles:
- role: sudo
tags:
- sudo
- hosts: '!sudo'
roles:
- role: doas
tags:
- doas
- hosts: '!pyrocufflink'
tasks:
- name: ensure users exist
user:
name: '{{ item.name }}'
comment: '{{ item.comment | d(omit) }}'
uid: '{{ item.uid | d(omit) }}'
groups: '{{ item.groups | d(omit) }}'
append: true
create_home: true
local: true
password: '*'
state: present
loop: '{{ managed_users | d([]) }}'
tags:
- user