Create SSH config for borg providers
This commit is contained in:
parent
fbdce3166f
commit
f4152f9a5e
5 changed files with 23 additions and 14 deletions
|
@ -22,10 +22,14 @@
|
|||
owner: "{{ borg_user }}"
|
||||
group: "{{ borg_group }}"
|
||||
|
||||
- name: "SSH | Insert borgbase configuration"
|
||||
- name: "SSH | Ensure configuration exists"
|
||||
ansible.builtin.file:
|
||||
path: .ssh/config
|
||||
state: touch
|
||||
mode: "0644"
|
||||
|
||||
- name: "SSH | Create SSH configuration"
|
||||
ansible.builtin.blockinfile:
|
||||
path: "{{ borg_user_ssh_config_path }}"
|
||||
path: .ssh/config
|
||||
marker: "### {mark} ANSIBLE MANAGED BLOCK"
|
||||
block: |
|
||||
Host *.repo.borgbase.com
|
||||
IdentityFile {{ borg_ssh_key_file_path }}
|
||||
block: "{{ lookup('template', 'ssh_config.j2') }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue