Hi,
I'm having problems with a playbook for setting up MariaDB, using Ansible 1.9.1 against a Centos 7.1.1503 host. I'll try and go step by step with the playbook, which starts thusly:
Running the above will correctly install MariaDB and start running the service. Now, from the actual MariaDB host, if I connect to the service using the mysql client I can get:
MariaDB [mysql]> select User,Host,Password from user;
+------+---------------------+----------+
| User | Host | Password |
+------+---------------------+----------+
+------+---------------------+----------+
Which is expected in a default unattended install: root password is blank and there are a couple of anonymous credentials. Note, however, that there are credentials for the host FQDN, so I'm inclined to use ansible_fqdn in the following.
Now comes the part of the playbook that's giving me problems, when setting up the credentials:
- name: Privileged credentials
password: "{{ mariadb.password }}"
- name: Privileged credentials console access
(Obviously, mariadb.password, above, is a variable which is also used on the .my.cnf template.) The above was taken from several sources online; I only changed the use of ansible_host to ansible_fqdn. Running the playbook will fail in that task:
msg: (1133, "Can't find any matching row in the user table")
If I run the previous MariaDB command I get:
MariaDB [mysql]> select User,Host,Password from user;
+------+---------------------+------------------+
| User | Host | Password |
+------+---------------------+------------------+
| root | localhost | *1018BCB9A91D... |
| root | 127.0.0.1 | *1018BCB9A91D... |
| root | ::1 | *1018BCB9A91D... |
+------+--------------------+-------------------+
Which shows that all the credentials were changed except the one with the FQDN host part. So, my question is: what am I doing wrong?
TIA.