update
This commit is contained in:
@ -0,0 +1 @@
|
||||
rez
|
@ -0,0 +1 @@
|
||||
rezr
|
22
bibliotheque/roles/create_admin_user/tasks/main.yml
Normal file
22
bibliotheque/roles/create_admin_user/tasks/main.yml
Normal file
@ -0,0 +1,22 @@
|
||||
# tasks file for create_admin_user
|
||||
- name Add the user with a specific uid and a primary group of "admin"
|
||||
ansible.builtin.user:
|
||||
name: "{{ item.name }}"
|
||||
comment: "{{ item.comment }}"
|
||||
uid: "{{ item.uid }}"
|
||||
loop: "{{ admin }}"
|
||||
|
||||
- name: Setup authorized key
|
||||
ansible.posix.authorized_key
|
||||
user: "{{ item.name }}"
|
||||
key: "{{ lookup('file', 'pud_key/{{ item.name }}.pub') }}"
|
||||
loop: "{{ admin }}"
|
||||
|
||||
- name: Update sudoers file and validate
|
||||
ansible.builtin.lineinfile:
|
||||
dest: /etc/sudoers
|
||||
insertafter: EOF
|
||||
line: "{{ item.name }} ALL=(ALL) NOPASSWD: ALL"
|
||||
regexp: "^{{ item.name }} .*"
|
||||
state: present
|
||||
loop: "{{ admin }}"
|
9
bibliotheque/roles/create_admin_user/var/main.yml
Normal file
9
bibliotheque/roles/create_admin_user/var/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
# var file for create_admin_user
|
||||
admin:
|
||||
- name: "hcornet"
|
||||
comment: 'Ultimate User'
|
||||
uid: '1000'
|
||||
|
||||
- name: 'semaphore'
|
||||
comment: 'Semaphore App User'
|
||||
uid: '1001'
|
Reference in New Issue
Block a user