Open ls-initiatives opened 7 years ago
Hum I notice the docs all point to a database names "icinga" so maybe we should change the debian package instead ?
Hello, thank you for your contribution. Yes, the proper change should be in the Packaging before we do any of the changes in the Ansible playbook. If you want that subject to be addressed you'll need to open an issue in the https://github.com/Icinga/icinga-packaging project. I'll put this PR on "Hold" till that issue is addressed and then I'll review it's implication or if it is no longer valid you can close it yourself.
I would suggest to look into how puppet-icinga2 allows to manage the database setup and implement the same behaviour.
https://github.com/Icinga/puppet-icinga2#setting-up-icinga-ido
For people that maintain their Icinga deployment with the ansible playbooks this will break their system as it will migrate the setup to a new DB and not retain the old data, so it is not backward compatible. It would help of you add a task to test if an old "icinga" db exist and migrate to the "icinga2" - or break and inform the user of the probable consequences.
The "migrate" step can be as easy as just rename the database, right?
The Debian package creates a database named "icinga2" by default, and we don't override those defaults in the role. It seems to make sense, so we can just as well change the role's default to match the package. Otherwise, on Debian the role will by default generate 2 databases : "icinga" created by the role and "icinga2" created by the package