-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Right now the config.py configuration files gets overwritten when upgrading the PostMaster from the debian package. This is because the deb just copies the files over into the directory and overrwrites anything in its path.
I've experimented with the conffiles option for deb packaging. I haven't gotten it to work yet, but it would end up spitting out a prompt like this:
Configuration file `/opt/postmaster/git/config.py'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** config.py (Y/I/N/O/D/Z) [default=N] ?
It may be better to ship the application with a config.default file and have an ansible task rename it for them to config.py?
That way when the package copies over, it will just overwrite the default file. If we push any config values to that config.default file, we can advise the user to copy those changes into their config.py file. Or maybe something weird with ansible templating I don't know. I'll look at all ways and see what works best.
Thoughts?