Add user to sudo or wheel
This commit is contained in:
parent
4178990345
commit
8cc22ac56f
@ -9,6 +9,18 @@
|
|||||||
groups: sudo
|
groups: sudo
|
||||||
append: yes
|
append: yes
|
||||||
become: yes
|
become: yes
|
||||||
|
- name: Add user to sudo
|
||||||
|
user:
|
||||||
|
name: "{{ user_username }}"
|
||||||
|
groups: sudo
|
||||||
|
become: yes
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
- name: Add user to wheel
|
||||||
|
user:
|
||||||
|
name: "{{ user_username }}"
|
||||||
|
groups: wheel
|
||||||
|
become: yes
|
||||||
|
when: ansible_distribution != "Ubuntu"
|
||||||
- name: Bootstrap user
|
- name: Bootstrap user
|
||||||
block:
|
block:
|
||||||
- name: Assure .ssh directory
|
- name: Assure .ssh directory
|
||||||
|
Loading…
Reference in New Issue
Block a user