Skip to content

Commit

Permalink
Add patch for when ansible_user != root and root is used inside borg
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Nov 4, 2024
1 parent 6dd0037 commit c868b5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/roles/borg/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
ssh_config_defined: "{{ ssh_config.stat.exists }}"

- name: Sync local ssh config vault remote
become: true
when: ssh_config_defined
ansible.builtin.copy:
src: "{{ playbook_dir }}/vaults/borg/.ssh/"
dest: "{{ ansible_user_home_dir }}/borgmatic/.ssh"
mode: "0700"
group: root
owner: root

- name: Render Borgmatic configuration
become: true
Expand Down Expand Up @@ -58,6 +61,7 @@
borg_lock_wait_time: 5

- name: Build borgmatic image
become: true
community.docker.docker_image:
name: datalab-borgmatic
source: build
Expand Down

0 comments on commit c868b5e

Please sign in to comment.