34 lines
623 B
YAML
34 lines
623 B
YAML
- name: install python3
|
|
apk:
|
|
name: python3
|
|
|
|
- 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: set rilla's authorized key
|
|
authorized_key:
|
|
user: rilla
|
|
key: '{{ item }}'
|
|
path: /home/rilla/.ssh/authorized_keys
|
|
with_file:
|
|
- public_keys/yubikey
|
|
register: ssh_keys
|
|
|
|
- name: commit ssh public keys with lbu
|
|
lbu:
|
|
include:
|
|
- /home/rilla/.ssh/authorized_keys
|
|
when: ansible_distribution == "Alpine" and ssh_keys.changed
|