From 64e337194c7e2efc9dc80ba67ee75a824d650caa Mon Sep 17 00:00:00 2001 From: Sebastian Schwarz Date: Thu, 7 Aug 2014 12:41:33 +0200 Subject: [PATCH] Make MySQL root username configurable While this doesn't seem to make sense on first glance it is useful for systems which were screwed with Parallels Plesk, which renames the MySQL root user to "admin". This change allowes this role to be used while the server is transitioning from Plesk to Ansible. --- defaults/main.yml | 1 + templates/python-my.cnf.j2 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1db9880..7f20304 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ --- mysql_user_home: /root +mysql_root_username: root mysql_root_password: root # Pass in a comma-separated list of repos to use (e.g. "remi,epel"). Used only diff --git a/templates/python-my.cnf.j2 b/templates/python-my.cnf.j2 index b013aa3..43de06a 100644 --- a/templates/python-my.cnf.j2 +++ b/templates/python-my.cnf.j2 @@ -1,3 +1,3 @@ [client] -user=root -password={{ mysql_root_password }} \ No newline at end of file +user={{ mysql_root_username }} +password={{ mysql_root_password }}