roles/users/tasks/main.yml hinzugefügt
This commit is contained in:
parent
a2149bd04c
commit
a975c0e2e1
1 changed files with 23 additions and 0 deletions
23
roles/users/tasks/main.yml
Normal file
23
roles/users/tasks/main.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
- name: Ensure group "admins" exists
|
||||||
|
# include_tasks: create_groups.yml
|
||||||
|
ansible.builtin.group:
|
||||||
|
name: admins
|
||||||
|
state: present
|
||||||
|
tags: groups
|
||||||
|
|
||||||
|
- name: Grant sudo without PW to admins group
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: roles/users/files/sudo_group_admins
|
||||||
|
path: /etc/sudoers.d/admins
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0440'
|
||||||
|
|
||||||
|
- name: Ensure user "rulrich" exists
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: rulrich
|
||||||
|
shell: /bin/bash
|
||||||
|
groups: admins
|
||||||
|
append: yes
|
||||||
|
ssh_public_key: "'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEecPevXnWu9Rs7QhDFAdeKl/E6cBPwUno+nEd4qoUAK rulrich@rabbit'\n"
|
||||||
Loading…
Add table
Reference in a new issue