I'm installing Percona Server 8.0 on Ubuntu using ansible, so it's non-interactive. I'm trying to run the post-install mysql_secure_installation
program, but that's not much good without interaction. Is there some way I can set its properties such as the default root password through an env var (which I've seen that percona server supports when running in docker) instead of interaction? Something along the lines of:
ansible.builtin.command: "MYSQL_ROOT_PASSWORD={{ mysql_rootpw | quote }} mysql_secure_installation"
However, this program is a binary not a script, so I can't see what it's looking for, and there are no docs on it, other than "run this".
I've also been looking in ansible galaxy for packages to do this, but it's all such a mess, and the best one I found doesn't support 8.0.
How can I best automate this installation?
0 Answers