ansible-role-borgbackup icon indicating copy to clipboard operation
ansible-role-borgbackup copied to clipboard

set default borg_ssh_command

Open kenayagi opened this issue 2 years ago • 5 comments

Without a default borg_ssh_command, borg_ssh_key_* seem useless.

kenayagi avatar Jun 14 '23 07:06 kenayagi

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.

m3nu avatar Jun 14 '23 09:06 m3nu

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.

kenayagi avatar Jun 14 '23 10:06 kenayagi

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.

m3nu avatar Jun 14 '23 10:06 m3nu

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.

kenayagi avatar Jun 15 '23 10:06 kenayagi

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

  • Set both the key name and the command when using a custom key
  • Hard-code the SSH command and add it in the Borgmatic config for everyone

m3nu avatar Jun 15 '23 12:06 m3nu