From c80257320f4f7da26cbff70de8eeb80878b81ece Mon Sep 17 00:00:00 2001 From: Frank Dornheim <524257+conloos@users.noreply.github.com> Date: Fri, 10 Mar 2023 18:24:02 +0100 Subject: [PATCH] renamed tasks/03_configure.yml to tasks/04_create_links_to_borg_and_borgmatic.yml --- .../04_create_links_to_borg_and_borgmatic.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tasks/04_create_links_to_borg_and_borgmatic.yml diff --git a/tasks/04_create_links_to_borg_and_borgmatic.yml b/tasks/04_create_links_to_borg_and_borgmatic.yml new file mode 100644 index 0000000..8710479 --- /dev/null +++ b/tasks/04_create_links_to_borg_and_borgmatic.yml @@ -0,0 +1,33 @@ +--- +- name: Create borgmatic command in /usr/local/bin + ansible.builtin.copy: + content: | + #!/bin/bash + . "{{ borg_venv_path }}"/bin/activate + borgmatic "$@" + dest: /usr/local/bin/borgmatic + mode: "0755" + owner: "{{ borgbackup_user }}" + group: "{{ borgbackup_group }}" + +- name: Create borg command in /usr/local/bin + ansible.builtin.copy: + content: | + #!/bin/bash + . "{{ borg_venv_path }}"/bin/activate + borg "$@" + dest: /usr/local/bin/borg + mode: "0755" + owner: "{{ borgbackup_user }}" + group: "{{ borgbackup_group }}" + +- name: Install helper scripts + ansible.builtin.copy: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" + mode: "{{ item.mode }}" + with_items: + - { src: "docker.sh", dest: "/usr/local/bin/docker.sh", owner: "{{ borgbackup_user }}", group: "{{ borgbackup_group }}", mode: "0770" } +...