bennojoy / mysql

ansible role for mysql
150 stars 137 forks source link

Default behavior #11

Open rgarrigue opened 10 years ago

rgarrigue commented 10 years ago

I just tried to use your role as a requirement for another, without any parameters. Meaning, it's all about installing mysql, cleaning anonymous users, etc.

Then I saw this

TASK: [mysql | update mysql root password for all root accounts] **************
changed: [centos] => (item=centos)
ok: [centos] => (item=127.0.0.1)
ok: [centos] => (item=::1)
ok: [centos] => (item=localhost)

TASK: [mysql | update mysql root password for all root accounts] **************
skipping: [centos] => (item=127.0.0.1)
skipping: [centos] => (item=::1)
skipping: [centos] => (item=localhost)

TASK: [mysql | copy .my.cnf file with root password credentials] **************
ok: [centos]

TASK: [mysql | ensure anonymous users are not in the database] ****************
ok: [centos] => (item=localhost)
ok: [centos] => (item=centos)

TASK: [mysql | remove the test database] **************************************
ok: [centos]

TASK: [mysql | Create the databases] ******************************************
ok: [centos] => (item={'replicate': False, 'name': 'ansible'})

TASK: [mysql | Create the database users] *************************************
ok: [centos] => (item={'pass': 'ansible', 'name': 'ansible', 'priv': 'ansible.*:ALL'})

TASK: [mysql | Create the replication users] **********************************
ok: [centos] => (item={'name': 'ansible_repl', 'pass': 'ansible'})

TASK: [mysql | Check if slave is already configured for replication] **********
skipping: [centos]

TASK: [mysql | Ensure the hostname entry for master is available for the client.] ***
skipping: [centos]

TASK: [mysql | Get the current master servers replication status] *************
skipping: [centos]

TASK: [mysql | Change the master in slave to start the replication] ***********
skipping: [centos]    

The thing that's bothering me is the default behavior, creating ansible database, users, replication user. I specified nothing, I expect it to create nothing.

But that's not such a big deal of course, if you've no time to deal with that.