summaryrefslogtreecommitdiff
path: root/roles/admin-user/tasks/main.yml
blob: e6fc3572ea1389581b2c2a857c0a41d73ace4dd2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
- name: install sudo
  apt:
    name: sudo
    state: present

- name: add admin users
  with_items: "{{ admin_user_group | default([]) | union(admin_user_host | default([])) }}"
  user:
    name: "{{ item.name }}"
    state: present
    password: "{{ item.password | default(omit) }}"
    groups:
    - sudo
    - adm
    append: yes
    shell: "{{ item.shell | default(omit) }}"