You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
531 B
24 lines
531 B
3 years ago
|
---
|
||
3 years ago
|
- name: Allow wheel to sudo without password.
|
||
|
copy:
|
||
|
dest: /etc/sudoers.d/00-tmp-sudo-full-access
|
||
|
content: "%wheel ALL=(ALL) NOPASSWD: ALL"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0440
|
||
|
|
||
|
- name: Create user {{ user_name }}.
|
||
|
user:
|
||
|
name: "{{ user_name }}"
|
||
|
state: present
|
||
|
create_home: true
|
||
|
groups: wheel
|
||
|
append: true
|
||
|
shell: /bin/bash
|
||
|
|
||
|
- name: Update user {{ user_name }}'s password.
|
||
|
shell: |
|
||
|
set -e -o pipefail
|
||
|
echo {{ user_name }}:{{ user_password }} | chpasswd
|
||
|
changed_when: true
|