2022-08-30 14:43:41 +02:00
|
|
|
- name: create group 'rilla'
|
|
|
|
group:
|
|
|
|
name: rilla
|
|
|
|
gid: 1000
|
|
|
|
|
|
|
|
- name: create user 'rilla'
|
|
|
|
user:
|
|
|
|
name: rilla
|
|
|
|
uid: 1000
|
|
|
|
group: rilla
|
|
|
|
home: /home/rilla
|
|
|
|
groups:
|
|
|
|
- rilla
|
|
|
|
- wheel
|
|
|
|
|
|
|
|
- name: make sure rilla owns its home
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: /home/rilla
|
|
|
|
owner: rilla
|
|
|
|
group: rilla
|
|
|
|
mode: '2755'
|
|
|
|
|
|
|
|
- name: set rilla's authorized key
|
|
|
|
authorized_key:
|
|
|
|
user: rilla
|
|
|
|
key: '{{ item }}'
|
|
|
|
path: /home/rilla/.ssh/authorized_keys
|
|
|
|
with_file:
|
|
|
|
- public_keys/yubikey
|
2022-08-30 15:10:01 +02:00
|
|
|
|
|
|
|
- name: commit rilla's home to lbu
|
|
|
|
lbu:
|
|
|
|
include:
|
|
|
|
- /home/rilla
|
|
|
|
- /home/rilla/.ssh/authorized_keys
|
|
|
|
exclude:
|
|
|
|
- /home/rilla/.ash_history
|
2022-08-30 17:39:14 +02:00
|
|
|
when: ansible_distribution == "Alpine" and use_lbu
|