borgbase / ansible-role-borgbackup

Ansible role to set up Borg and Borgmatic
MIT License
226 stars 99 forks source link

set default borg_ssh_command #133

Open kenayagi opened 1 year ago

kenayagi commented 1 year ago

Without a default borg_ssh_command, borg_sshkey* seem useless.

m3nu commented 1 year ago

Not useless, since Borgmatic will use its own default. (which is fine in most cases)

You can still override the option, if you need to pass custom options.

kenayagi commented 1 year ago

I'm not that sure, but I could be missing something.

For example: if you only specify a custom borg_ssh_key_name, the role will use it to generate a new pair, but not for authenticating to the remote server with that public key.

m3nu commented 1 year ago

That's right. If you make your own key you also need to adjust this command. We had it like this during the last big refactor.

The issue with this is that you clutter the config file for the majority of users using standard keys and need to maintain this command.

kenayagi commented 1 year ago

I do not agree: if I change the ssh key I'll have to remember to also change the ssh command. (You can read: human error incoming 😅). With this simple default, instead, the role will edit it accordingly. And if a user need another custom command he can overwrite it. However, please feel free to close the PR. I've only thought it could have been useful.

m3nu commented 1 year ago

Both options aren't great. I already thought about it when someone else suggested it in the big refactoring PR.