homelab/ansible/playbooks/create_user.yml
2024-03-17 11:07:58 +01:00

29 lines
705 B
YAML

---
- hosts: all
roles:
- role: ansible-user
vars:
user_name: '{{ user.name }}'
user_ldap: '{{ sssd_configure}}'
user_password: '{{ userPassword }}'
user_authorized_key: '{{ user.authorized_keys}}'
user_privatekey: '{{ user.privatekey}}'
user_shell: '/bin/zsh'
user_uid: '{{ user.uid }}'
user_groups:
- docker
become: true
become_user: '{{ user.name }}'
- hosts: all
roles:
- role: user_config
vars:
user_config_username: "{{ user.name }}"
become_user: "{{ user.name }}"
become: true
- role: user_config
vars:
user_config_username: root
become: true