diff --git a/roles/btrbk/tasks/alpine.yml b/roles/btrbk/tasks/alpine.yml index c4b4b7c..04f4c8a 100644 --- a/roles/btrbk/tasks/alpine.yml +++ b/roles/btrbk/tasks/alpine.yml @@ -2,6 +2,7 @@ - name: install packages apk: name: - - btrbk - - coreutils # needed by btrbk - btrfs-progs + - mbuffer + - openssh + - perl diff --git a/roles/btrbk/tasks/debian.yml b/roles/btrbk/tasks/debian.yml index 3d8ae55..66f6506 100644 --- a/roles/btrbk/tasks/debian.yml +++ b/roles/btrbk/tasks/debian.yml @@ -2,5 +2,8 @@ - name: install packages apt: name: - - btrbk - btrfs-progs + - mbuffer + - openssh-client + - openssh-server + - perl diff --git a/roles/btrbk/tasks/main.yml b/roles/btrbk/tasks/main.yml index 3f2d825..d134e75 100644 --- a/roles/btrbk/tasks/main.yml +++ b/roles/btrbk/tasks/main.yml @@ -7,6 +7,17 @@ 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" @@ -39,9 +50,10 @@ owner: btrbk mode: '0644' -- name: add btrbk ssh keys to lbu +- name: add btrbk files to lbu lbu: include: + - /usr/local/bin/btrbk - /var/lib/btrbk/.ssh/id_ed25519 - /var/lib/btrbk/.ssh/id_ed25519.pub - /var/lib/btrbk/.ssh/authorized_keys diff --git a/roles/btrbk/vars/main.yml b/roles/btrbk/vars/main.yml new file mode 100644 index 0000000..d3588f6 --- /dev/null +++ b/roles/btrbk/vars/main.yml @@ -0,0 +1 @@ +btrbk_url: https://raw.githubusercontent.com/digint/btrbk/master/btrbk