20 lines
557 B
YAML
20 lines
557 B
YAML
|
---
|
||
|
- name: "SSH | Generate an OpenSSH keypair"
|
||
|
community.crypto.openssh_keypair:
|
||
|
path: "{{ borg_ssh_key_file_path }}"
|
||
|
type: "{{ borg_ssh_key_type }}"
|
||
|
|
||
|
- name: "SSH | Ensure configuration file is present"
|
||
|
ansible.builtin.file:
|
||
|
path: "{{ ssh_config_name }}"
|
||
|
state: touch
|
||
|
mode: "644"
|
||
|
|
||
|
- name: "SSH | Insert borgbase configuration"
|
||
|
ansible.builtin.blockinfile:
|
||
|
path: "{{ ssh_config_name }}"
|
||
|
marker: "### {mark} ANSIBLE MANAGED BLOCK"
|
||
|
block: |
|
||
|
Host *.repo.borgbase.com
|
||
|
IdentityFile {{ borg_ssh_key_file_path }}
|