49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
---
|
|
- name: alpine setup
|
|
include_tasks: alpine.yml
|
|
when: ansible_distribution == "Alpine"
|
|
|
|
- name: debian/ubuntu setup
|
|
include_tasks: debian.yml
|
|
when: ansible_distribution in ["Debian", "Ubuntu"]
|
|
|
|
- name: copy btrbk config
|
|
copy:
|
|
src: "host_files/btrbk/{{ ansible_hostname }}/btrbk.conf"
|
|
dest: /etc/btrbk/btrbk.conf
|
|
|
|
- name: make btrbk user ssh directory
|
|
file:
|
|
state: directory
|
|
path: /var/lib/btrbk/.ssh
|
|
owner: btrbk
|
|
|
|
- name: copy btrbk user ssh key
|
|
copy:
|
|
src: id_ed25519
|
|
dest: /var/lib/btrbk/.ssh/id_ed25519
|
|
owner: btrbk
|
|
mode: '0400'
|
|
|
|
- name: copy btrbk user ssh public key
|
|
copy:
|
|
src: id_ed25519.pub
|
|
dest: /var/lib/btrbk/.ssh/id_ed25519.pub
|
|
owner: btrbk
|
|
mode: '0644'
|
|
|
|
- name: copy btrbk user ssh public key to authorized_keys
|
|
copy:
|
|
src: id_ed25519.pub
|
|
dest: /var/lib/btrbk/.ssh/authorized_keys
|
|
owner: btrbk
|
|
mode: '0644'
|
|
|
|
- name: add btrbk ssh keys to lbu
|
|
lbu:
|
|
include:
|
|
- /var/lib/btrbk/.ssh/id_ed25519
|
|
- /var/lib/btrbk/.ssh/id_ed25519.pub
|
|
- /var/lib/btrbk/.ssh/authorized_keys
|
|
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
|