This commit is contained in:
2023-07-03 20:39:45 +02:00
parent 25445b2a98
commit 5152f44924
149 changed files with 17896 additions and 5 deletions

View File

@ -0,0 +1 @@
rez

View File

@ -0,0 +1 @@
rezr

View 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 }}"

View 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'