Maintaining configuration integrity

The issue with making changes in this manner is that they do not scale well. Tuning a MariaDB server for a production workload often requires setting perhaps half a dozen, or more, parameters. Thus, that simple role that we wrote previously could well grow to become a tangle of regular expressions and directives that are difficult to decipher, let alone manage.

Regular expressions themselves are not foolproof and are only as good as they are written to be. In our previous example, we used the following line to look for the bind-address directive, with a view to changing it. The regular expression ^bind-address\s+= means to look for lines in the file that have the following:

  • Have the bind-address literal ...

Get Hands-On Enterprise Automation on Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.