--- - 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: create btrbk directory config file: state: directory path: /etc/btrbk - name: download btrbk executable get_url: url: '{{ btrbk_url }}' dest: /usr/local/bin/btrbk mode: '0755' - name: copy btrbk config copy: src: "host_files/btrbk/{{ ansible_hostname }}/btrbk.conf" dest: /etc/btrbk/btrbk.conf - name: copy btrbk ssh key copy: src: id_ed25519 dest: /etc/btrbk/id_ed25519 owner: btrbk mode: '0400' - name: copy btrbk user ssh public key to authorized_keys copy: src: id_ed25519.pub dest: /etc/ssh/authorized_keys/btrbk owner: btrbk mode: '0644' - name: add btrbk files to lbu lbu: include: - /usr/local/bin/btrbk when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]