How to handle later configuration changes of installed software ?

Hello all,
I use ansible to install software and do the first configuration and i like this very much.

But I want to achieve that I can recreate the running systems as detailled as posible from the outside with scripts, with ansible for example.

Maybe an example helps to clarify the problem:

Consider necxtcloud. The software consists of a webserver, a bunch of php-software and a database.

The configuration consists of

  • webserver configuration

  • php configuration

  • config.php (nextcloud)

  • tables in the database

The data consists of

  • files in the filesystem
  • tables in the databas

The webserver configuration and the php configuration can be defined in ansible and

distributed, no problem there.

The configuration tables in the database are changed via the web interface, i don’t see a realistic chance to to handle them with ansible at all.

The config.php can and will be changed via the web interface and If i overwrite the file with ansible I lose all these changes.

How do peaople handle this kind of situation ? I try to be disciplined and change the ansible files synchronous to configuration changes on the running system, but I would like to make this process bullet-proof.

Any ideas ?

Thanks a lot

Norbert

Database changes can be scripted in SQL by DBAs. These SQL scripts can be executed from a command line. Good app config mgmt should require this as part of DevSecOps automated deployments and upgrades. It also serves to document changes to tables, indexes, etc. Database server configuration changes also should be scripted and configuration files placed under version control. We use GitLab CI/CD workflows for app deployments. We use ansible for server and infrastructure management.

Walter

You can’t really have two sources of truth.
I would just keep the ansible part and think of it as initial configuration (as you already do).
From there on lots of entropy is added, so I would use something to keep that, like a backup strategy for the files and tables etc.
You could still use ansible, but then to automate the recovery process.