roles/users/tasks/main.yml aktualisiert
This commit is contained in:
parent
8ea4e93efb
commit
5ffee019c1
1 changed files with 31 additions and 17 deletions
|
|
@ -21,23 +21,20 @@
|
||||||
line: '#includedir /etc/sudoers.d'
|
line: '#includedir /etc/sudoers.d'
|
||||||
validate: /usr/sbin/visudo -cf %s
|
validate: /usr/sbin/visudo -cf %s
|
||||||
|
|
||||||
#- name: Ensure user "lea" exists
|
- name: Ensure user "lea" exists
|
||||||
# ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
# name: lea
|
name: lea
|
||||||
# shell: /bin/bash
|
shell: /bin/bash
|
||||||
# groups: admins
|
groups: admins
|
||||||
# append: yes
|
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
|
||||||
#- name: Ensure user "beat" exists
|
ansible.builtin.user:
|
||||||
# ansible.builtin.user:
|
name: beat
|
||||||
# name: beat
|
shell: /bin/bash
|
||||||
# shell: /bin/bash
|
groups: admins
|
||||||
# groups: admins
|
append: yes
|
||||||
# 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 "rulrich" exists
|
- name: Ensure user "rulrich" exists
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
|
|
@ -46,6 +43,22 @@
|
||||||
groups: admins
|
groups: admins
|
||||||
append: yes
|
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
|
- name: Set up authorized keys for user rulrich
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: rulrich
|
user: rulrich
|
||||||
|
|
@ -53,3 +66,4 @@
|
||||||
key: '{{ item }}'
|
key: '{{ item }}'
|
||||||
with_file:
|
with_file:
|
||||||
- public_keys/rulrich
|
- public_keys/rulrich
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue