roles/users/tasks/main.yml aktualisiert

This commit is contained in:
rulrich 2024-03-08 18:49:24 +01:00
parent 8ea4e93efb
commit 5ffee019c1

View file

@ -21,23 +21,20 @@
line: '#includedir /etc/sudoers.d'
validate: /usr/sbin/visudo -cf %s
#- name: Ensure user "lea" exists
# ansible.builtin.user:
# name: lea
# shell: /bin/bash
# groups: admins
# append: yes
# ssh_public_key: "'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDShIcp8vkYwQOFYHEFlGUB6jbhwKTT/1SZgsIGCkNGamclxzg141q+k4891aIyaJfpWp/sGZUqBullKrgRdyOoRAZaCcECu29NXm4SNyoh8krYL6NL1R4uzwbt3xiyXrfSuw1qNwAtDOhVMINH+92jTo+2fqaXzrHoG0xnNClokOApIkwNHabpU8SG3dKgQrIHughWfdNq6Ot55hy4yV/34AhUbyKnLRjRJ0GlIc7IcyxmIzUCsD30ALXSdawdAWfFpkHvEbYzbMDfYJGB1EOqIdnCbIHJ7GTn6Q0gZkLQXcQxxQw13pHAMlsBHfbdAWKN0KOpULNKBYhhJaMs43dBeL6GWpWD1quO2tBQV9ddIPmhp3IJHpFss+MuLBv3vFP3x9Hvxau9sHoL1pSXp3Itn9mxftJ5VEnBmSsfEE+3+i0+fXspkHeGWc8qOgVfDc3UjoMBFBpo1FMMqQrRncV1CEpb7ODt2JlGmSkfUtSPdb6bHRYCmhoIUz47QOpU8gs= lea@MBP-von-Lea'\n"
#
#- name: Ensure user "beat" exists
# ansible.builtin.user:
# name: beat
# shell: /bin/bash
# groups: admins
# append: yes
# ssh_public_key: "'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILz8hrUqVpZxTsXCo0CH5KzNB+t7skM4DdKfyri+R+eX'\n
#'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPy52w3bK6XDfcQu/Z83hP6+ApvS2nDOdlMSkMOCRV1I beat@wall-e.sunnig.ch'\n
#'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPv1RlUA6Zupypx5LY9BP6kzwZbdPnpjTDT26b6W860x administrator@36154.hostserv.eu'\n"
- name: Ensure user "lea" exists
ansible.builtin.user:
name: lea
shell: /bin/bash
groups: admins
append: yes
- name: Ensure user "beat" exists
ansible.builtin.user:
name: beat
shell: /bin/bash
groups: admins
append: yes
- name: Ensure user "rulrich" exists
ansible.builtin.user:
@ -46,6 +43,22 @@
groups: admins
append: yes
- name: Set up authorized keys for user lea
ansible.posix.authorized_key:
user: lea
state: present
key: '{{ item }}'
with_file:
- public_keys/lea
- name: Set up authorized keys for user beat
ansible.posix.authorized_key:
user: beat
state: present
key: '{{ item }}'
with_file:
- public_keys/beat
- name: Set up authorized keys for user rulrich
ansible.posix.authorized_key:
user: rulrich
@ -53,3 +66,4 @@
key: '{{ item }}'
with_file:
- public_keys/rulrich