autorestic
autorestic copied to clipboard
Disable auto key generation for config managment
Is your feature request related to a problem? Please describe.
I'm using config management to deploy autorestic on multiple servers. My ansible role creates autorestic config files in a declarative manner. Even though I like the idea of auto-generating keys, and adding them to the config file for interactive sessions, this functionality stands against the principle of declarative config management. Usually it works well when I provide a key with ansible, so autorestic doesn't need to modify the config file. However, there are situations where you try to setup a new backend and doen't supply the key yet, and a auto-modified config is pretty confusing.
Describe the solution you'd like
- Add a flag that disables auo key generation of the config file (i.e.
--no-key-generation
)
First I thought it would be good to ask the user for permission to modify the config file but in automated backups using cron jobs i.e. this is not possible, so autorestic should just fail in case of a missing key, if this option is set.
What do you think ?
https://github.com/cupcakearmy/autorestic/issues/194#issuecomment-1135801425
I think I'll remove writing to config. Makes a lot of thinks more complicated that they need to be and creates confusion
Adding a new command to generate the key rather than editing the config would be great