Greetings!
I am new to ansible and im trying to install mysql-server below is my playbook [im in a vmware10 using two centos 6.5 x64 machines one as ansible-Node and another as client]
Try searching for “mysql” on galaxy.ansible.com and you’ll see a lot of roles that set up MySQL>
In this case it sounds like you have a MySQL specific config issue and it’s not specifically an Ansible issue, but I agree it’s not the best possible experience from the tool.
(Note that you’ll really want to see this fully automated anyway, hence why I recommend researching MySQL roles. Having to manually run the interactive step to configure it isn’t the long term goal, etc)
What is MySQL version?
If 5.6 - root password is placed in /root/.mysql_secure or same file and when you login first time with it into mysql server, it ask you to change password.
I have role to setup MySQL
For 5.3 - 5.5
Install packages, run mysql_install_db, generate password and place it into variable, generate unattended file like this:
PASSWORD
PASSWORD
and apply this file on server via “cat unattended_file | mysql_secure_install”