mirror of
https://github.com/nikdoof/ansible-borgmatic.git
synced 2025-12-25 08:49:21 +00:00
Initial commit
This commit is contained in:
30
tasks/config.yaml
Normal file
30
tasks/config.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: Create /etc/borgmatic folder
|
||||
ansible.builtin.file:
|
||||
path: /etc/borgmatic
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
- name: Write borgmatic config
|
||||
template:
|
||||
src: config.yaml.j2
|
||||
dest: /etc/borgmatic/config.yaml
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
- name: Create /root/.borgmatic folder
|
||||
ansible.builtin.file:
|
||||
path: /root/.borgmatic
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
- name: "Copy SSH key {{ item }} to borgmatic config folder"
|
||||
ansible.builtin.copy:
|
||||
src: "ssh_keys/{{ item }}"
|
||||
dest: "/etc/borgmatic/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0600"
|
||||
loop: "{{ borgmatic_ssh_keys }}"
|
||||
Reference in New Issue
Block a user