infrastructure/ansible/roles/base/tasks/user.yml

15 lines
316 B
YAML

- name: Make me
user:
name: "{{ user }}"
home: "{{ home }}"
comment: "{{ name }}"
shell: /bin/bash
system: true
become: true
- name: Give user sudo access
user:
name: "{{ user }}"
groups: "{{ 'sudo' if ansible_os_family == 'Debian' else 'wheel' }}"
append: true
become: true